aCiotola / ReservationSys

Software Dev 3 - Assignment
0 stars 0 forks source link

Part 3 – Graphical User Interface #24

Open aCiotola opened 7 years ago

aCiotola commented 7 years ago
  1. Due to the time constraints, the GUI application is simplified – we are taking care of the information screen, not the registration and reservation screens. I have provided you partial code of the groupX.hotel.ui.GUIViewController class. This takes care of the look&feel but has NO event handling or notification handling. The GUI looks like this (sorry-not-sorry for the Comic-sans font), feel free to improve

  2. Add the required event handling (for Controller functionality) and notification handling (for View functionality) (referring to lab 11 for an example). Changes to be made include:

a. make the GUIViewController implement Observer. b. change the GUIViewController constructor so that it gets a handle to a Hotel model, and add a private instance field to keep a reference to the model. Within the constructor, also add this to the model’s observer list. Finally, control whether the resultPanel JPanel is visible. (use the setVisible method) c. you need to listen for the events when someone clicks on a button. You can use anonymous inner classes or create new private inner classes that implement ActionListener to take care of each button event (your choice, in lab 11 we created inner classes) d. Within the actionPerformed methods, all you will do is invoke the appropriate model method. Catch potential exceptions, and display a JOptionPane message dialog. e. Within the update method, you will need to write results to the resultText, and ensure the resultPanel is visible.

Also refer to the screenshots on page 7.

  1. The GUIApp is provided. Use this application to run your GUI.