Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started