Question: c++ Class Media Private data: size (in Mega bytes or MB). Public static constant data: default size of 0.0, default charge per MB (5 cents

c++

Class Media

  • Private data: size (in Mega bytes or MB).
  • Public static constant data: default size of 0.0, default charge per MB (5 cents or 0.05), default minimum charge of 1.00 and SIZE_THRESHOLD of 100.00 (MB). This SIZE_THRESHOLD will be used in the PurgeLargeMessages function (see class SmartCarrier).
  • Public default/non-default constructors.
  • Public destructor (no-op)
  • Public accessor/mutator
  • Public member function:
    • GetCharge ( ): multiply charge per MB by size. If the result is greater than default minimum charge of 1.00 return it. Otherwise return the default minimum charge. Note: must use static data variables whenever applicable. Using "magic numbers" such as 1.00 or 0.05 will get point deduction.

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!