Use this file to record your reflection on this assignment.
-
What are your initial impressions of how
Inheritance
affects your programming? Inheritance defineitly makes coding quicker and more efficient. Having the Building class with its set attributes made creating the rest of the classes way easier. -
What worked, what didn't, what advice would you give someone taking this course in the future? For my add and remove resident methods, it would throw a run time exception even though I had added the name of the person to the array list. I fixed this by printitng the array list to make sure that the name was actually in the list. The name was not in the list. Instead,"name" was in the list 6 times. I realised that my parameter for these functions was name as a string and not the variable "name". I changed it and everything in the house class started working smoothly.
After figuring ou the first class, the rest went smoothly.
The last problem I had was with the restock part of the sellCoffee method. Initially I had used an if statement with multiple ors to restock each variable. This did not work as planned so I created multiple if statements.
Advice: Printing things like lists or the varibales used in a function is a great tool when debugging.
Resources Used https://www.geeksforgeeks.org/java-program-to-read-elements-using-enumeration-in-hashtable/?ref=rp