Question: Design a class named Restaurant. The class contains: -A private static int data value named storeCounter that starts at 1 and increments for each new
Design a class named Restaurant. The class contains:
-A private static int data value named storeCounter that starts at 1 and increments for each new restaurant item that is created
-A private array of string values called Menu
-A private int value called StoreID
-A boolean value called OpenClosed
-A no-argument constructor that creates a new Store object and performs the following:
-Sets storeID to storeCounter, then increments storeCounter
-Sets OpenClosed to true (Open)
-Sets Menu to be size 3 with no values inside
-A two-argument constructor that creates a new store object, accepts an int value, accepts a boolean value, and performs the following:
Sets storeID to storeCounter, then increments storeCounter
-Sets OpenClosed to the boolean value
-Sets Menu to be the size of the int value
- A void method called setMenu() that allows the user to input string values to populate the menu array
-A void method called setMenuEasy() that sets the first three indexes of the menu array to the following: "Hamburger", "Hot dog", and "Pizza"
-A void method called Details() that prints out the following properties of a restaurant: StoreID, the menu items, and whether or not the restaurant is open
In the main method, perform the following:
-Create 3 new restaurants
-The first restaurant should have the default parameters
-The second restaurant should be open and have a menu size of 2
-The third restaurant should be closed and have a menu size of 3
-Call setMenuEasy() for the 1st and 3rd restaurant
-Call setMenu() for the 2nd restaurant, you can set the menu to any 2 items you want
-Call Details() for all three restaurants
Additional Requirements:
*Include the UML diagram for the Restaurant class.
*Program header, pseudocode explaining the design of the class and testing in the main()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
