COSC2288 Online Food Ordering & Delivery System and Further Programing - IT Computer Science Assignment Help

Download Solution Order New Solution
Assignment Task

 

 

 

Task 


Task specification
The system keeps a list of restaurants where users can order their food from. It allows the user to order from different restaurants and receive discounts on the combined order. The list of restaurants is provided in Restaurants.txt file and discount information is provided in Discounts.txt file.
Each line in Restaurants.txt file contains the following information of a restaurant:

  •  Restaurant name,category,delivery fee,food item1-price,food item 2-price,… An example record from Restaurants.txt is shown below:
  •  Fast Burger,Fast food,$5.00,Funky Burger-$12.00,French Fries-$7.50,Coca Cola-$2.00 Melbourne Eats offers discounts based on the amount of money you spend on the order:
  • Any order < $10, no discount
  •  >= $10 & < $20, 10% discount
  •  >= $20 & < $30, 15% discount
  •  >= $30, 20% discount

 

Delivery fee is calculated as follows:

  • If you order from the same restaurant, it is the full delivery fee of that restaurant.
  • If you order from more than one restaurant, apply 50% off on the sum of delivery fees. For example, if you order food from Burger King, Chicken King, and Moeders R., the delivery fee = 50% * ($5 + $5 + $10).

The first four lines in Discounts.txt file contain the discount information for the order:

  • [min_amount,max_amount),discount_percentage

An example record for “any order < $10, no discount” from Discounts.txt is shown below:

  • [0,10),0% 

Please note the maximum amount for “>= $30, 20% discount” is omitted:

  •  [30,),20% 

 

The last line in Discounts.txt file contains the discount information for the delivery fee:

  •  min_num_of_restaurants_in_order,discount_percentage The delivery discount from Discounts.txt is shown below:
  • 2,50% This means if the order is from at least 2 different restaurants (i.e., more than one restaurant), apply 50% off on the sum of all delivery fees.

 

The console-based menu provides the following options:

  • The user can browse the restaurants by category (e.g., Fast Food). Once the category is selected, the user can choose from the list of restaurants under that category.
  • The user can search for a restaurant by name. The program should list all restaurants with the matching input. For example, if the user types king, the menu should show both Burger King and Chicken King. The user can then choose one from the list.
  • Once a restaurant is selected, the user can order food from the restaurant.
  •  The user can continue to order from other restaurants until completing the order.
  •  The user can then check out. In checkout, an order summary will be printed out, including purchased food items (the quantity of each food item, name of the item, and calculated price - quantity times single item price), order price and delivery fee (with a discount if applicable), total amount saved, and total price (order price plus delivery fee). You do not need to consider GST in the calculation of price.
  • ?The user can choose to quit the program. The program does not keep the previous incomplete order.

 

2. Assessment Criteria
This assessment will determine your ability to implement Object-Oriented Java code according to the specifications shown below. In addition to functional correctness (i.e., getting your code to work) you will also be assessed on code quality. Specifically:

  • You are required to demonstrate your understanding of basic object-oriented programming principles, including encapsulation and abstraction.
  • You are required to use well-tested Java collections.
  • You are required to validate all user inputs and catch and handle all exceptions.
  • You are required to demonstrate that you have done adequate unit testing using the JUnitframework.
  • You are required to read all system data from files and parse the information correctly.
  • You are required to write properly documented code. 

 

3. Learning Outcomes
This assessment is relevant to the following Learning Outcomes:
CLO1: Explain the purpose of OO design and apply the following OO concepts in Java code:
inheritance, polymorphism, abstract classes, interfaces, and generics.
CLO2: Describe the Java Collections Framework (JCF) and apply this framework in Java code.
CLO4: Demonstrate proficiency using an integrated development environment such as Eclipse for project management, coding and debugging.

4. Assessment details
In this assignment, you will incrementally build the basic Java program. The assignment is structured into 2 milestones with one in-lab demo to your lab tutor during week 4 and one postsubmission video demo during week 6 (adding up to 6 marks in addition to the 15 marks for the assignment). Instructions for milestone checking will be provided separately in the milestone submissions.

 

Part A

  • You will incorporate basic object-oriented concepts (e.g., abstraction and encapsulation). In particular, you will define several classes to support the OO implementation. You will also need to choose appropriate data structures to store relevant information (e.g., a list of food items in a restaurant; a list of restaurants in Melbourne Eats). You MUST use Java Collections because the list of food items/restaurants is growable.
  • Your program should perform basic input validation (e.g., out-of-bound option) and provide clear console messages for invalid inputs and further actions.
  • The order summary should be well-formatted (HINT: you can use System.out.printf method for formatting).
  • You can hard code the restaurant and discount information at this point. You MUST use the information provided in the files, for testing purposes; please do not create new restaurant or discount information.
  • You will need to document the code properly by following Code Conventions for the Java Programming Language by Oracle:https://www.oracle.com/java/technologies/javase/codeconventions-introduction.html

 

Part B

  • You are required to write unit tests for all classes that include functions using JUnit framework. Your unit tests should have a good coverage of the typical use cases of your classes (e.g., calculating the order price for multiple food items ordered from multiple restaurants) and test all reasonable corner cases (e.g., handling invalid method arguments). You do not need to write unit tests for getters and setters. 

 

Part C

  •  You are required to read all information from the given files for restaurants and discounts (HINT: you can use Scanner class and its relevant methods to read from text file and parse the information). In Discounts.txt file, for simplicity, you only need to extract numbers from the file and use appropriate operators (e.g., >= or <) directly in the code.
  • You are required to catch and handle all exceptions in your program. For example, if you use Scanner class to read the text file, you will need to catch and handle the FileNotFoundException specified by Scanner class. Avoid throwing an unspecific Exception; throw a specific exception (e.g., throw a NumberFormatException instead of an IllegalArgumentException).

 

 

This COSC2288 IT Computer Scince Assignment has been solved by our IT Computer Scince Expert at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing Style. Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. 

You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turn tin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
 

 

 

 

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.