aCiotola / ReservationSys

Software Dev 3 - Assignment
0 stars 0 forks source link

Part 1 – Make the Hotel an Observable class #22

Open aCiotola opened 7 years ago

aCiotola commented 7 years ago

Your Hotel class should already extend the Observable class: Hotel is our model and as such it will notify views when there are changes.

Add the setChanged and notifyObservers method invocations in the methods listed below; these are the only methods which will require the view to be made aware of a change in state. Note that the Object argument passed in the notifyObservers invocation will vary depending on the method:

createReservation-> invoke setChanged and notifyObservers(optionalReservation) findCustomer-> invoke setChanged and notifyObservers(customer) findReservations-> invoke setChanged and notifyObservers(List) registerCustomer-> invoke setChanged and notifyObservers(customer) updateCreditCard-> invoke setChanged and notifyObservers(customer)