heresitespeed.blogg.se

Zipsender
Zipsender









zipsender

In your main program, create an array of Package named pkgList which holds a list of 3 packages.

zipsender

Both derived classes will override the calcCost0 and print() functions from the base class. extraFeePerOunce with double type add necessary constructors and getter and setter functions for extraFeePerOunce a. Create a derived class named OvernightPackage which inherits from Package and also includes its own data member and functions. flatFee with double type add necessary constructors and getter and setter functions for flatFee a. Create a derived class named TwoDayPackage which inherits the functionality from based class Package, but also include its own data member and functions c. void print) - displays the package information including type of package, sender, recipient, weight, and cost. double calcCost0 - returns the cost of the package (weightInOunce costPerOunce) e. necessary getter and setter functions for each private data members d. eterized constructor to set the value for each private data members param c. Package class should contain the following functions constructor which initializes the private data members a. Your program should contain the following functionality: Create a base class named Package which has the following private data members a. Both classes will override the calcCost() and print() functions from the base class. OvernightPackage class inherits from Package class and also includes a fee which charges extra fee per ounce for overnight delivery services.

zipsender

Derived class TwoDayPackage should inherit the functionality from base class, Package, but also includes its own data member that represents a flat fee for two-day delivery services. By creating an account you agree to receive account related email communication from ZipShare. Package class has a function calcCostwhich allows derived classes to override with their own implementations. In the base class (Package), it includes sender and recipient information, package weight in ounces and cost per ounce. Use Package (standard package) as the base class of the hierarchy, and then add two derived classes TwoDayPackage and OvernightPackage. Create an inheritance hierarchy to represent various types of packages. Transcribed image text: Description Your family runs a package delivery services which offer a number of different shipping options, each with specific costs associated.











Zipsender