Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java The Reservation class, which contains: A private data field named reservation_number - A private data field named reservation_datetime which indicates the date and time
java
The Reservation class, which contains: A private data field named reservation_number - A private data field named reservation_datetime which indicates the date and time of the reservation. Use the Date data type for this field. A private data field named table to represent the table being reserved. This data type should be the Table class you created earlier. A private data field named reserved_for to indicate the name of the person or group reserving the table. A private data field named phone_number - A private data field named tables reserved to track the total number of reservations at the restaurant. This data field is shared by all class members. - Create getter and setter methods (accessors and mutators) for all data fields. Do not create a setter for tables reserved. Create a constructor that takes two arguments: reserved_for and phone number. The constructor should set a reservation number (you can be creative in how you generate a reservation number). reservation datetime (create an instance of the Date class for this value), reserved_for and phone_number. The constructor should update the tables reserved count. Create a method called reservation_details that prints the data fields of a reservation Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started