1. Homepage
  2. Programming
  3. CSCP1014 PROGRAMMING 1 - Assignment 2A: Menu-driven console-based Java program

CSCP1014 PROGRAMMING 1 - Assignment 2A: Menu-driven console-based Java program

Contact Us On WeChat
JavaCSCP1014PROGRAMMING 1 MalaysiaSunway University

CSCP1014 PROGRAMMING 1 Spring 2022 CourseNana.COM

Assignment 2A CourseNana.COM

100 marks & 15% of coursework CourseNana.COM

1. Purpose of assignment CourseNana.COM

Create a menu-driven console-based Java program for a parcel delivery company to maintain the company's daily sales and calculate the dispatchers' daily payroll. CourseNana.COM

2. Instructions CourseNana.COM

Company background CourseNana.COM

       i.         XXX (you may give a name to the company) is a parcel delivery company that helps its customers to send their documents/products/orders within Selangor state. CourseNana.COM

      ii.         The company has 3 part-time dispatchers. CourseNana.COM

     iii.         Each dispatcher can only deliver a maximum of 15 orders per day. CourseNana.COM

     iv.         The company divides the Selangor state into 2 zones, named Zone A and Zone B. CourseNana.COM

      v.         The delivery fee is calculated based on the total weight of the order, not the number of parcels in the order. CourseNana.COM

     vi.         Table 1 below shows the minimum fee per order. CourseNana.COM

    vii.         The user needs to pay an additional RM1 for every additional 100g. CourseNana.COM

  viii.         The parcel weight will be rounded up to the nearest 100g. CourseNana.COM

     ix.         The following shows 2 calculation examples: CourseNana.COM

o Parcel weight=252g deliver from Zone A to Zone A CourseNana.COM

Delivery fee = RM6 (first 100g) + RM2 (additional 152g) = RM8 CourseNana.COM

o parcel weight=330g, deliver from Zone B to Zone A
Delivery fee = RM7 (first 100g) + RM3 (additional 230 gram) = RM10

x. The dispatcher will earn RM3 per order with an extra 5% commission if he has more than 10 orders for the day. The calculation for the commission is, CourseNana.COM

commission = 5% * total order amount. CourseNana.COM

Zone A -> Zone A Zone B -> Zone B CourseNana.COM

Zone A -> Zone B Zone B -> Zone A CourseNana.COM


Program requirement CourseNana.COM

       i.         Develop a menu-driven Java program for the XXX company to maintain its daily sales. CourseNana.COM

      ii.         The company's administrative staff is the only person to use the program. No login CourseNana.COM

module and no permanent storage are required to store the data. Instead, the program will CourseNana.COM

be restarted every day. CourseNana.COM

     iii.         The program must have minimum 2 arrays: CourseNana.COM

                       1.         An array initialized with 3 part-time dispatchers' names. CourseNana.COM

                       2.         A two-dimensions array of size 3*15 stores the orders' charges for the 3 CourseNana.COM

iv. The program has a method to display the main menu with 4 options, add a new order, modify an order, view all orders, and exit. Once the user has completed the selected operation, the program will continuously loop back to this main menu method until the user chooses the Exit option to exit the program. CourseNana.COM

v. A method to perform the enter new order option CourseNana.COM

  1. The user will select a dispatcher, from-zone, the to-zone, and enter the total order weight.
  2. The program must validate all input values and allow the user to re-enter if invalid.
  3. If the chosen dispatcher has reached the maximum number of parcels for the day, the user needs to re-select another available dispatcher.
  4. Once all the input values are entered, the program will calculate and record the package charges into the orders array.
  5. A new order number is to be generated. It comprises the despatchers array’s index number, the order's index number, the from-area, and the to-area.
    Example: order number = 10221 means it is the third order for the second despatcher and delivery from area 2 to area 1.
    10221 despatcher order from to index no index no area area
  6. The program will then display the order no, the dispatcher's name (retrieved from the array), the from-zone, to-zone, and total charges on the screen.

vi. A method to perform the modify an order option CourseNana.COM

  1. The program will prompt the user to enter an order number.
  2. The program will validate if the order number exists. If it exists, it will display the order information on the screen, such as the order number, the dispatcher's name, the from zone, to zone, and the total charges.
  3. The program will then prompt the user to enter a new weight.
  4. The program will re-calculate the new delivery fee. If the new delivery fee is less than the existing fee, the program will display the refunding amount; otherwise, the program will display the top-up amount.
  5. After that, the program will update the respective array and return to the main menu.

A method to perform the display of all orders option
a. The program will display all orders for the day, as shown below. All the data should be retrieved from respective arrays using loops.
XXX delivery company daily report for 30Nov 2022 CourseNana.COM

Dispatcher XXX YYY ZZZZ Total CourseNana.COM

Order 1 5 … …. CourseNana.COM

Order 2 6 … …. CourseNana.COM

Order 3 10 … … CourseNana.COM

: : … … CourseNana.COM

Total no of orders 12 … … XX CourseNana.COM

Gross wages 36.00 … … XX CourseNana.COM

Commission 2.10 … … XX CourseNana.COM

Total wages 38.10 … … XX CourseNana.COM

The main method should ONLY have statements to execute the method that will display the main menu.
There must be at least FOUR methods in the program to handle the required operations. You can add any additional methods to your program.

All the dispatcher's names and the order's fee must retrieve from the respective arrays. You must decide what values should declare as instance variables and what values to remain as the local variables in respective methods. CourseNana.COM

3. Due date and criteria
This assessment's due date is 22 November 2020 (Tuesday) at 2 pm. CourseNana.COM

Soft copy: upload the soft copies files through the e-learn link:
a) Name the class with the main method as
Assignment2A_yourname.java, and compress the src folder into 1 .zip/.tar file.
d) Capture 10 sample output screens with/without an error message(s) in 1 .pdf file

Get Expert Help On This Assignment

Scan above qrcode with Wechat

Java代写,CSCP1014代写,PROGRAMMING 1 代写,Malaysia代写,Sunway University代写,Java代编,CSCP1014代编,PROGRAMMING 1 代编,Malaysia代编,Sunway University代编,Java代考,CSCP1014代考,PROGRAMMING 1 代考,Malaysia代考,Sunway University代考,Javahelp,CSCP1014help,PROGRAMMING 1 help,Malaysiahelp,Sunway Universityhelp,Java作业代写,CSCP1014作业代写,PROGRAMMING 1 作业代写,Malaysia作业代写,Sunway University作业代写,Java编程代写,CSCP1014编程代写,PROGRAMMING 1 编程代写,Malaysia编程代写,Sunway University编程代写,Javaprogramming help,CSCP1014programming help,PROGRAMMING 1 programming help,Malaysiaprogramming help,Sunway Universityprogramming help,Javaassignment help,CSCP1014assignment help,PROGRAMMING 1 assignment help,Malaysiaassignment help,Sunway Universityassignment help,Javasolution,CSCP1014solution,PROGRAMMING 1 solution,Malaysiasolution,Sunway Universitysolution,