Program 2

General Policies:

Do NOT share code. You will not receive help on the day a program is due or after the due date, SO DO NOT PROCRASTINATE!!!

Program 2 counts for 11% of your grade.

Background:

In this assignment, you will build a program supporting a basic restaurant manager. A restaurant manager collects payments, distributes tips to staff, handles health department inspections, opens and closes restaurants, maintains satisfaction ratings, maintains locations of restaurants, and pays expenses. Only 4 restaurants will be managed.

Write a Restaurant class. Please include fields for the name of the restaurant, the cuisine of the restaurant, the location of the restaurant on a map (java.awt.Point), an indication of whether the restaurant is open (true or false), an indication of whether the restaurant has failed the health inspection (true or false), the current health inspection score (a whole number), the number of customers who have visited, a list of the violations of the restaurant, the total ratings given by the customers (on a 1 to 5 scale), the total sales of the restaurant, the total expenses of the restaurant, the current amount of undistributed tips, the number of staff of the restaurant, and the cuisine of the restaurant. Also, there should be default values for the tip percentage, the number of staff, the initial health inspection score, the minimum passing health inspection score, the amount of expenses, the cuisine, and a formatter for prices in dollars and cents format. These should be shared among all Restaurant objects created.

Write a RestaurantManager class that stores 4 restaurants (HAS-A relationship) and the name of the manager. The constructor then calls a private method to instantiate the four restaurants. Simply hard code the information for the items in this private method.

In addition, write a RestaurantManagerDriver class to control the restaurant manager. Instantiate a RestaurantManager object (this should be a static instance variable in the driver) with your name as the manager (ex. Jane Smith). Include enough menu options to allow all tasks to be performed. Write a private static helper method for each of the options. Make sure to check user input. I will try to break your program.

Format all costs with the DecimalFormat class. Use commas as separators in your format where appropriate.

Program Specification:

Program Documentation:
Follow the documentation guidelines.

Submission:
Electronic Submission: All files needed to run your program!
Comment and Print Out: