subject

Use C++ in the following.

Overload the + operator as indicated.
Sample output for the given program:

First vacation: Days: 7, People: 3
Second vacation: Days: 12, People: 3

include
using namespace std;
class FamilyVacation{
public:
void SetNumDays(int dayCount);
void SetNumPeople(int peopleCount);
void Print() const;
FamilyVacation operator+(int moreDays);
private:
int numDays;
int numPeople;
};
void FamilyVacation::SetNumDays(int dayCount) {
numDays = dayCount;
return;
}
void FamilyVacation::SetNumPeople(int peopleCount) {
numPeople = peopleCount;
return;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:30
Jaina and tomas are being considered as new tenants in an apartment. the landlord looks at their creditworthiness because he wants to be sure his new tenant pays the rent on time and in full. the table below summarizes the information that was on their applications. application information questions jaina tomas how many years have you had your job? 5 2 what is your monthly salary? $1,850 $2,500 how many credit cards do you have? 4 1 how much debt do you have? $13,000 $7,000 how many times were you late with payments on credit cards in the past year? 5 1 who will the landlord decide to be more creditworthy and why? tomas because the ratio of his debt to income is less. jaina because she has had her job longer, which makes her look more stable. jaina because she has more credit cards available to her. tomas because he makes more money per month.
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
question
Computers and Technology, 23.06.2019 15:10
What role did women fill during world war ii?
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
You know the right answer?
Use C++ in the following.

Overload the + operator as indicated.
Sample output for...
Questions
question
English, 24.02.2021 08:00
question
Geography, 24.02.2021 08:00
question
Mathematics, 24.02.2021 08:00
question
Mathematics, 24.02.2021 08:00
Questions on the website: 13722367