Computers and Technology

Define the missing member function. use "this" to distinguish the local member from the parameter name.

#include
using namespace std;

class cableplan{
public:
void setnumdays(int numdays);
int getnumdays() const;
private:
int numdays;
};

// fixme: define setnumdays() member function, using "this" implicit parameter.
void cableplan: : setnumdays(int numdays) {

/* your solution goes here */

return;
}

int cableplan: : getnumdays() const {
return numdays;
}

int main() {
cableplan house1plan;

house1plan. setnumdays(30);
cout < < house1plan. getnumdays() < < endl;

return 0;
}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:00, amyeileen
11. is the ability to understand how another person is feeling. a. authority b. sympathy c. empathy d. taking a stand
Answers: 1
image
Computers and Technology, 22.06.2019 11:30, mmimay3501
What do character formats do for your document's message? a. set the tone b. provide organization c. provide clarity d. set how texts align with documents
Answers: 2
image
Computers and Technology, 24.06.2019 12:30, tragicteekaay
Nikki sent flyers in the mail to all houses within the city limits promoting her computer repair service what type of promotion is this and example of
Answers: 1
image
Computers and Technology, 24.06.2019 13:00, toshahoskins0098
What are some websites that you can read manga (ex: manga rock)
Answers: 1
Do you know the correct answer?
Define the missing member function. use "this" to distinguish the local member from the parameter na...

Questions in other subjects:

Konu
Mathematics, 23.04.2021 14:00
Konu
Chemistry, 23.04.2021 14:00