Part 1 – Helper Class:
Using the skeleton provided, which has a linkedList of reservation objects and a queue of reservation objects.
Code all the methods that will affect the linkedList:
·
public int addReservation(Reservation aReservation):
add a reservation object to linkedList in the order of ascending dates
·
public int changeReservation(Reservation oldRes, Reservation newRes):
iterate through the linkedList to find a reservation object in the linkedList, remove it, and then add another reservation object to the linkedList in the order of ascending dates
·
public int deleteReservation(Reservation aReservation):
find a reservation object in the linkedList, remove it
·
public String listAllReserv():
iterate through the reservation linkedList and create a String of all reservation objects in the order of ascending dates.
Code all the methods that will affect the queue:
·
public int addAWalkInQueue(Reservation aReservation):
add a reservation object to the queue in FIFO order
·
public String listAllWalkIns():
iterate through the reservation queue and create a String of all reservation objects in the queue in FIFO order
·
public Reservation deleteAWalkIn():
iterate through the reservation queue and remove the first reservation object in the queue
Part 2 –RestaurantSystem Class:
Using the skeleton provided, display a menu of options for the user:
1. Make a Reservation
2. Change a Reservation
3. Cancel a Reservation
4. List all of the Reservations
5. Seat a Reservation
6. Add a Walk-In
7. List all of the Walk-Ins
8. Seat a Walk-In
9. Exit
Keep looping and displaying the menu, processing the user’s request. Each menu option calls a corresponding public void method(), which in turn interacts with the user by asking for data that is needed to then create a Reservation object(s) and pass it to the corresponding method in the Helper class, to add, change, or remove either the linkedList of reservation objects or add and remove to the queue of walk-in reservation objects.
Each of the following methods are called depending on the menu option that was selected:
1. public void addReservation()
2. public void changeReservation()
3. public void cancelReservation()
4. public void listAllReservations()
5. public void seatAReservation()
6. public void addAWalkIn()
7. public void listAllWalkIns()
8. public Reservation seatAWalkIn()
The skeleton is provided using the console to display (sout) information, and the keyboard to retrieve information from the user.
Extra Credit will be awarded if the driver class, RestaurantSystem.java, is converted into a GUI that contains a JFrame, with JPanel(s), text fields, labels, and buttons for each of the actions listed in #1 – 8. Create a JPanel for all the buttons that represent
I also have the skeleton