Question: This program should calculate package shipping costs. The shiping company has the following discount percentages. Shipping Costs: Discount %: $200 or less 1.9% $200.01 to
This program should calculate package shipping costs. The shiping company has the following discount percentages.
Shipping Costs: Discount %:
$200 or less 1.9%
$200.01 to $500 2.4%
$500.01 to $1000 2.8%
$1000.01 or more 3.3%
Package Types Shipping Costs:
1. Video games: Cost is number of video games * $19.99 per video game. For overnight delivery, add $4.99. Optional insurance is 6% of the cost.
2. Genius Phones: Cost is number of genius phones * $699.99 per genius phone. For optional overnight delivery add $25.00. If a genius phone case is needed, add $24.99 per genius phone. The number of of genius phones requiring the genius phone case should be passed to the appropriate method. Optional insurance is 11% of the cost.
3. Hot Dogs: cost is number of hot dogs * $5.99 per hot dog. For optional overnight delivery, add $9.00. If condiments are needed, add $0.79 per hot dog for the condiments. If hot dog buns are to be ordered, an additional charge of $1.29 per hot dog is required. Optional insurance is 3% of the cost.
4. A package type of your choice: Please include documentation (comment statements) stating how the costs should be calculated for your package type.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For each package type, print out the names, address, city, state, and zip code for the customer. in addition, print out the date the package is expected to arrive along with the total cost with how the calculation was done, the discount percentage, and the total cost after the dicount is subtracted off. Please make sure to include output for each of the four package types.
Your program should use virtual functions including at least one pure virtual function with polymorphism. Your program should have one class for each package type along with a base-class that contains the appropriate data members and methods. An example of sample output for video games could be:
Ex:
Customer: Joe Blow Expected Arrival Date: 3-25-2017
1234 Main Street
Irvine, CA 92618
4 video games ordered: shipping cost is $79.96, overnight delivery is $4.99, no insurance specified
Total Cost is $84.95
Discount percentage is 1.9% for a discount of $1.61
Total Cost after discount is $83.34
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
