Basic Code Requirements
•create a project called TheShipment
•create at least two classes
1.Main
a.contains the main method
b.runs the program
2.Shipment
a.calculates the cost of the Shipment
Main Class (the class that contains the main method)
•prompts the user to enter a id and to enter details about a package to be delivered o the package details are to be:
package weight (in kilograms)
delivery method for package
air, train or truck
•the user is then presented with
o the shipment cost
othe insurance cost
•the user is then presented with an option to either
o enter the details of another package to be delivered o or to end the program
• once the user ends the program, the user is presented with a final bill showing the details of all the packages that have been processed
othus for an order of two packages:
package 1 shipping cost, insurance cost
package 2 shipping cost, insurance cost
total shipping cost, insurance cost, total cost
Shipment Class
• calculates the cost of the shipment
• contains at least two private methods
o
shipmentCost
o
calculates the cost of the shipments
insuranceCost
calculates the cost of the insurance
• the Shipment cost is calculated using the following table
Weight
Air
Truck
Mail
(kilograms)
per kilo
per kilo
per kilo
1 to 10
4.00
3.00
2.00
10.01 to 20
3.00
2.45
1.75
Over 20
2.50
1.95
1.55
• the insurance cost is calculated using the following table
Shipping Cost ($)
Insurance Cost ($)
0 to 100.00
2.45
100.01 to 300.00
3.95
300.01 and over
5.55