Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions