Question: C++. With comments for explanation please! Requirements This program demonstrates inheritance. Supply appropriate interaction (input/output) with your user. Again, provide appropriate interaction (input/output) with your
C++. With comments for explanation please!

Requirements This program demonstrates inheritance. Supply appropriate interaction (input/output) with your user. Again, provide appropriate interaction (input/output) with your user. Class Package - contains the following: 1. Member data: name, address, city, state, zip for both sender and receiver. weight, costPerOunce 2. Member functions: constructor to initialize all member data. setters and getters for all member data 3. Member function: calculateCost() returns a double of weight x costPerOunce 4. Ensure weight and costPerOunce >0 Class TwoDayPackage - inherits from Class Package and contains the following: 1. Member data: twoDayFee (an additional flat rate fee for two day shipping) 2. Member functions: setTwoDayFee(), getTwoDayFee(), Override calculateCost() to include twoDayFee Class OvernightPackage - inherits from Class Package and contains the following: 1. Member data: overnightRate (an additional cost per ounce rate for overnight shipping) 2. Member functions: setOvernightRate(), getOvernightRate(), Override calculateCost() to include overnightRate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
