IA02

Download and unzip IA02.zip
Modify the code so that FederalExpress and UnitedParcelService
implement the IShipper interface
That may involve some renaming of methods in the implementing classes
But do NOT change any of the Java code in IShipper.java
Add a 3rd shipping company named PlanetExpress
It must implement IShipper
PlanetExpress.outputProducts() must output all the fields that are
in the Product class
It must be neat and readable
Don’t just jam all the data together
It must output the total count of items to be shipped
It must output the total weight of items to be shipped
Add this new shipper to Menu.runDemo()

Sample output –

How do you want to ship your order?
1) FedEx
2) UPS
1
Your shipment is being processed by Federal Express
Items getting ready to ship:
1 Mechanical Keyboard (5.2 oz)
1 Wireless Mouse (1.3 oz)
3 HP Monitor (25.1 oz)
2 Aperion Speakers (20.8 oz)
Total number of items: 7
When choosing UPS:
How do you want to ship your order?
1) FedEx
2) UPS
2
Your shipment is being processed by UPS
Items getting ready to ship:
Mechanical Keyboard [1]
Wireless Mouse [1]
HP Monitor [3]
Aperion Speakers [2]
After you add the 3rd shipper:
How do you want to ship your order?
1) FedEx
2) UPS
3) Planet Express
3

Writing the output for the PlanetExpress is part of the assignment, so I’m
not including it here
Read the Details section closely

the file is attached.

Leave a Reply

Your email address will not be published. Required fields are marked *