Description
You are required to develop a takeaway order management system for a restaurant that delivers pizza and pasta. Your program should maintain a list of customer orders that need to be delivered at any one time.
When first run, it should present the user with a menu with the following options:
1. Enter the details of a customer order, which is then added to the order list.
2. Deliver an order, and remove it from the list. The next order to be delivered should always be the order that has been on the list for the longest time. The details of the delivered order should be printed to the screen.
3. Print out details of all the orders in the list.
4. Exit the program.
This menu should continue running in a loop until Option 4 is selected by the user.
An order’s details consist of:
– a list of food items
– a customer name
– a customer contact number
– a delivery address
– the meal type of the order, i.e., whether or not it is vegetarian, vegan, or contains meat. This information should be determined by the program, based on the food items contained in the order. If there is any food item with meat in the order, then the order’s meal type is classed as ‘meat’. If there are no meat items but some vegetarian items, then the order is classed as ‘vegetarian’. For an order to be classed as ‘vegan’, there must be no food items that are meat or vegetarian.
– a total cost, which is calculated by the program. This is the sum of the prices of all the food items in the order.
– A pizza has a list of toppings, which can be one or more of any combination of the following six items: ham, cheese, pineapple, mushrooms, tomato, seafood. For a pizza to be vegetarian, it must not contain ham or seafood. For a pizza to be vegan, it must not contain ham, seafood, or cheese.
– A pasta meal has only a single topping, which is one of the following four items: bolognese (meat), marinara (meat), primavera (vegetarian), tomato (vegan).
– Pizza and pasta without any toppings can be assumed to be vegan.
Each food item also has an associated price, which is calculated by the program as follows:
– The base price of either a pizza or pasta meal is $11.50.
– Each pizza topping adds an extra $2, except pineapple which adds $2.50 and seafood which adds $3.50.
– For the pasta toppings, tomato adds $4, bolognese and primavera each add $5.20, and marinara adds $6.80.
For full marks, your design should contain all of the following:
– inheritance, with an abstract class as the super class.
– an interface which ensures that the price and meal type can always be retrieved from both food items and orders
– at least one enum type
– at least four classes overall (including the abstract class).
Code design and correctness (35 marks)
High-level functionality (7 marks)
– Implementing overall main menu structure correctly
– Adding an entered order correctly to the order list
– Removing the oldest order from the order list, and printing that order’s details to the screen (using appropriate calls to toString methods)
– Printing all order details (using appropriate calls to toString methods)
Correctly retrieving and storing order details (8 marks)
– Storing the customer’s name, contact number, and delivery address with the order
– Allowing the user to enter a list of food items, which are stored with the order
– Allowing the user to define multiple toppings for each pizza item, and a single topping for each pasta item
Price and meal type calculations (8 marks)
– Ensuring prices of orders and food items are calculated and reported correctly
– Ensuring meal types (meat/vegetarian/vegan) of orders and food items are calculated and reported correctly
Design requirements (12 marks)
– Sensible overall class design and adherence to good design principles
– Modularisation of complex tasks within classes
– Validation checks on user input
– Appropriate and correct use of inheritance
– Appropriate and correct use of an abstract class
– Correct use of an interface to ensure price and meal type are implemented as required
– Appropriate and correct use of enum type
Steve Starkey –
I have received phenomenal service that is consistent. The quality of work is A+ and the prices are very reasonable.
Megan Mowles –
Fantastic support for every assignment, every time. 5+ Stars!
Frank Cory –
Awesome work as usual!!
Narayana Rao –
I highly recommend this website. It is definitely the best.
Rahul Doshi –
I am pleased for the assistance to get a answer to my questions. The service is prompt and provides good value to me.
Alexander Turpin –
The assignment was excellent and I have scored 100 percent. I am very proud and happy with you.