For this assignment, you are required to develop an application to enable a user to rate a restaurant. A rating is a real number between 1 and 5 inclusive, where 1 is the lowest rating and 5 is the highest rating.
The application should work as follows:
The application (i.e. not the user!) sets the following numbers:
At the start of the application, the application should display on the screen the type of items a user can provide information for (i.e. based on the item type assigned to you in section Instructions and Checklist). The application should also display on the screen the maximum number of items that the user could provide information for, and the maximum number of ratings that could be provided for each item.
Next, the application should display on the screen the functionalities that the application provides, in a menu/format similar with the one shown in Table 1. Next, the application should prompt the user to enter their choice. The application should allow a user to repetitively use the available functionalities until the user decides that they want to exit the application.
Table 1 Application Menu
Application Menu ... For Item Type: XYZ (replace XYZ with the Item Type assigned to you in section Instructions and Checklist)
1 - Add an item
2 - Display all the items
3 - Add a rating for a given item
4 - Display all the ratings for a given item
5 - Calculate and display the average rating for each item
6 - The functionality assigned to you in section Instructions and Checklist
7 - Exit application
Enter your choice:
Note that arrays should be used to store all the items provided by the user and all the ratings provided for a given item. IMPORTANT: For these tasks you should only use arrays (you should not use other data structures that were not covered within the module).
The functionalities that the application must provide are as follows:
1. Add an item
2. Display all the items
3. Add a rating for a given item
4. Display all the ratings for a given item
5. Calculate and display the average rating for each item
6. The functionality assigned to you in section Instructions and Checklist
7. Exit application
Note that the application should work irrespective of how the user provides the data i.e. using upper case letters, lower case letters or a combination of both upper case and lower case letters.
Validation should be performed for all the user input, and if invalid input is provided the application should display a corresponding message to inform the user.
Your application should make use of instantiable classes and demonstrate your ability to use other programming concepts, which we have covered in the Software Development module.
Please follow the instructions. Ensure that you complete each of the following checklist items:
a) The application should enable a user to provide information about restaurants, and provide reviews for these restaurants.
b) Maximum number of items and maximum number of ratings: Define two constants in your application for the maximum number of items that could be provided, and the maximum number of ratings that could be provided for each item. Assign a value of your choice to each of the two constants that is at least 3.
c) Functionality: Display the worst item based on the average rating (i.e. the item with the lowest average rating).