Question: ( 2 0 pts ) You are given the following class which describes one delivery of recyclables to our center ( not all functions are

(20 pts) You are given the following class which describes one delivery of recyclables to our center (not all
functions are included):
class CDelivery
{
public:
virtual double Payment(){ return mPounds * mRecyclable->PricePerPound(); }
virtual double GetPounds(){ return mPounds; }
virtual bool IsPremium(){return false; }
private:
CRecyclable *mRecyclable = nullptr;
};
double mPounds;
Create a new C++ class CPremiumDelivery derived from CDelivery that has the member variable: double
mPremium. Create three functions: Payment, GetTons, and IsPremium. You are not allowed to change CDelivery
in any way.
 (20 pts) You are given the following class which describes one

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!