4.a Debugging with Objects

Database= a shopping list for users to add food items they wish to purchase, their price, desired quantity, and store they want to buy from.

schemaobjects Above are the attributes that each object has in my database schema. Each one of these attributes, such as quantity, item, price, or store name, has its own column in the database.

createsteps This image above shows me entering attributes when creating a new item from the menu. I entered c, which brought me to the create function that is defined above. As I step into these inputs and enter attributes for this new item, they are being initialized as shown in the top left corner.

createditem Once I am finished creating my new item and the function call is completed by printing “Item created: “, I am directed back to the menu where I can start a new CRUD operation.

  • Results

    precreate Above is my database before I created the new object above.

postcreate Above is the result of my new item being created in my database. The new item is “Flour” as you can see above.