answersLogoWhite

0


Best Answer

Overload extraction is a meaningless term. However you don't need overloaded functions for this.

class PhoneCall {

std::string _phone_no;

unsigned _duration; // in minutes

double _rpm; // rate per minute

public:

PhoneCall (std::string, unsigned, double); PhoneCall (const PhoneCall&) = default;

PhoneCall (PhoneCall&&) = default;

PhoneCall& operator= (const PhoneCall&) = default;

PhoneCall& operator= (PhoneCall&&) = default;

~PhoneCall (void) = default;

};

PhoneCall::PhoneCall (const std::string& phone_no, const unsigned duration, const double rpm):

_phone_no {phone_no}, _duration {duration}, _rpm {rpm}

{}

Usage:

std::vector<PhoneCall> calls;

v.push_back ({"01315554284", 6, 0.10}); // 6-minute call at 10p per minute

v.push_back ({"01315554292", 5, 0.15}); // 5-minute call at 15p per minute

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you design a PhoneCall class in c plus plus that holds a phone number to which a call is placed with length of the call in minutes and the rate charged per minute using overload extraction?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering
Related questions

What are any time minutes?

A minute of use on a cellular phone that is charged at a flat rate rather than charged according to the time of day.


Blood clot wisdom teeth?

Blood clots generally form after your wisdom tooth extraction within thirty to sixty minutes.


James learned that lifting weights for an hour is actually counter-productive He has changed his routine to last 30 minutes Which principle of overload is at work?

time


How long will a 6600 mAH laptop battery last when fully charged?

About 11 minutes


James learned that lifting weights for an hour is actually counter-productive. He has changed his routine to last 30 minutes. Which principle of overload is at work?

time


How long can you talk on the phone before it needs to be put back into the base and charged?

User can talk on the phone upto 300 minutes before it needs to be charged


Is monthly cell phone service charged before the month it is used?

No because if you overuse texting or minutes the charge you more so it is charged the end of the month or beggining, or ehatever


Why does the LG flare cell phone beep every 2 minutes?

Because its warning you it needs to be charged


How long does it take to charge up a phone that hasn't been charged for weeks?

30 minutes to an hour


What happens if you start a call in peak minutes and end after night minutes?

You will get charged for the peak minutes and not for the end minutes. for example if you start a call at8:30 and end at 9:15 (assuming your phone company doesn't charge for minutes after 9:00) the company will not charge you for the 15 minutes after nine.


Dental fees Ontario?

Who can i contact to obtain the recommended fee rates for dental work - namely for an extraction of a molar? A proceedure that lasted 10 minutes. I live in Ottawa.


Why saturated KCL in DNA extraction is used?

Saturated KCl precipitation is often used in DNA extraction for molluscan taxa. Molluscs produce a polysaccharide rich mucus that interferes with the reagents involved in DNA extraction. The KCl saturated solution is used right after the digestion step: about 1/4th of the volume of the digestion solution is added to the sample. Samples are then centrifugated at 14rpm for 15 minutes. The pellet formed will contain the polysaccharides and non digested tissue. The supernatant is extracted from the tube and used in the next steps of the DNA extraction.