Description: Designing an inheritance hierarchy for a Package: 1) Base Class Package (a) Including the name of the sender, the name of the recipient, the address, the weight of the package and the unit weight price; B) Provide constructors; C) Provide the billing function double calculateCost (), calculate and return the package freight according to unit weight unit price and package weight; D) Provide PRNT function, output package basic information and package freight. 2) Derived TwoDayPackage (a) Inherit Package and include two-day express service flat delivery fee baseCost; B) To rewrite the calculateCost function of the base class, freight should be added to the calculateCost function on the basis of the calculation of the base class function. C) Rewrite the PR
To Search:
File list (Check if you may need any files):
Filename | Size | Date |
---|
Package.dev | 1657 | 2019-05-19
|
Package.layout | 470 | 2019-05-19
|
TwoDayPackage.cpp | 700 | 2019-05-19
|
TwoDayPackage.h | 491 | 2019-05-19
|
Definition.h | 738 | 2019-05-19
|
main.cpp | 655 | 2019-05-19
|
OverNightPackage.cpp | 885 | 2019-05-19
|
OverNightPackage.h | 541 | 2019-05-19 |