Purpose of assignment Create a menu-driven console-based Java program for a package delivery company to maintain the company's

computer science

Description

Assignment 2

 

100 marks & 15% of coursework

 

 

  • Purpose of assignment

Create a menu-driven console-based Java program for a package delivery company to maintain the company's daily sales and the despatchers’ daily payroll.

 

  • Instructions

i)             Company background

-          XXX (you may give a name to the company) is a package delivery company that helps their customers to send their documents/products/orders within Selangor and Kuala Lumpur.

-          The company has 5 part-time dispatchers (delivery-men), where everyone can only deliver a maximum 20 packages per day.

-          The dispatcher is paid daily with RM3 per package to deliver within Selangor, and RM4 per package to deliver to Kuala Lumpur.  The dispatcher will earn an extra 5% or 8% commission if he has delivered 10-15 packages or >15 packages respectively in a day.

-          The company is charging its customer RM5 for delivering within Selangor and RM6 to Kuala Lumpur.

ii)                   Program requirement

-          Develop a menu-driven Java program for the company to maintain its daily sales and the despatchers’ daily payroll.

-          The program will be used by the company’s administrative staff, and no login module is required. 

-          The program will be restarted every day and do not need to store the values in any permanent storage.

-          The program must have a main menu with 3 menu options as mentioned below, and one Exit option. All menu options including the main menu must be implemented in individual method.  Once the user has completed each menu option, the program will loop back to the main menu until the user chooses the Exit option.

       The 3 menu options are:

-          Enter new order

o  The user needs to select the destination and the dispatcher.

o  The program will record the package charges into the respective array.

o  The user will be informed by the program if the chosen dispatcher has reached the maximum number of packages for the day. It should allow the user to re-select another dispatcher.

o  The order no, the dispatcher’s name and total charges will be displayed on the screen.

o  The order no is made-up of the despatcher’s index number, order’s index number, and the order date. For instance, if the chosen despatcher is stored in array row 2, the order charges are stored in column 3, with the order’s date of 30 0ct 2019, then the generated order number will be 0203301019, i.e. the first 2 digits are for despatcher’s array index, follows by 2 digits for order’s array index and the last 6 digits for the date, in the format of ddmmyy.

 

-          Delete Order

o  the user needs to enter the package no and choose the despatcher.

o  The program will search the order from the array.

o  If the order is found, the program needs the user to re-confirm before deleting the order. Once the user confirms to delete, the package’s charges for the order will be set to 0.

o  The program should display a message if the order cannot be found.


Related Questions in computer science category