Question: Assignment Problem Design a class named Restaurant. The class contains: -A private static int data value named storeCounter that starts at 1 and increments for

Assignment Problem

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() *Include a screenshot of a test run of the main(), example below:

Homework Submissions & Assessment

Your submission should include:

The assignment report containing the items specified in the previous section

The Java source code.

Submit the report in the Word document and all Java source code files to the dropbox of this assignment. Make sure to check the completeness of your submission after they are submitted.

Task Items

Complete & Correct

Incomplete/ Partially Correct

Missing

Solution Design (UML Diagram) (15%)

100%

By %

0

Solution Pseudo-Code (Java comments) (10%)

100%

By %

0

Java Program (60%)

100%

By %

0

Testing Completeness (15%)

100%

By %

0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!