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

JavaCSCP1014PROGRAMMING 1 MalaysiaSunway University

CSCP1014 PROGRAMMING 1 Spring 2022

Assignment 2A

100 marks & 15% of coursework

1. Purpose of assignment

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.

2. Instructions

Company background

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.

ii.         The company has 3 part-time dispatchers.

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

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

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

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

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

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

ix.         The following shows 2 calculation examples:

o Parcel weight=252g deliver from Zone A to Zone A

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

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,

commission = 5% * total order amount.

 Zone A -> Zone A Zone B -> Zone B Zone A -> Zone B Zone B -> Zone A

AMERICAN DEGREE TRANSFER PROGRAM SUNWAY UNIVERSITY

Program requirement

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

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

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

be restarted every day.

iii.         The program must have minimum 2 arrays:

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

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

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.

v. A method to perform the enter new order option

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

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.

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

Dispatcher XXX YYY ZZZZ Total

Order 1 5 … ….

Order 2 6 … ….

Order 3 10 … …

: : … …

Total no of orders 12 … … XX

Gross wages 36.00 … … XX

Commission 2.10 … … XX

Total wages 38.10 … … XX

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.

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

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 in Touch with Our Experts

QQ
WeChat
Whatsapp
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,