subject

Write the definition of a class ContestResult containing:An data member winner of type string , initialized to the empty string .An data member secondPlace of type string , initialized to the empty string .An data member thirdPlace of type string , initialized to the empty string .A member function called setWinner that has one parameter , whose value it assigns to the data member winner. A member function called setSecondPlace that has one parameter , whose value it assigns to the data member secondPlace. A member function called setThirdPlace that has one parameter , whose value it assigns to the data member thirdPlace. A member function called getWinner that has no parameters and that returns the value of the data member winner. A member function called getSecondPlace that has no parameters and that returns the value of the data member secondPlace. A member function called getThirdPlace that has no parameters and that returns the value of the data member thirdPlace. This is what I have so far:class ContestResult{private:string winner;string secondPlace;string thirdPlace;public:void setWinner(string);void setSecondPlace(string);void setThirdPlace(string);string getWinner();string getSecondPlace();string getThirdPlace();};void ContestResult::setWinner(string theWinner){winner="theWinner";}void ContestResult::setSecondPlace(strin g theSecondPlace){secondPlace="theSec ondPlace";}void ContestResult::setThirdPlace(string theThirdPlace){thirdPlace="theThird Place";}string ContestResult::getWinner(){return winner;}string ContestResult::getSecondPlace(){ret urn secondPlace;}string ContestResult::getThirdPlace(){retu rn thirdPlace;}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead w 4 epizodzie
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
You have read about the beginnings of the internet and how it was created. what was the internet originally created to do? (select all that apply) share research. play games. communicate. share documents. sell toys
Answers: 1
question
Computers and Technology, 24.06.2019 05:50
What all vehicles has tesla inc. created over the years
Answers: 3
question
Computers and Technology, 24.06.2019 13:00
Which one of the following functions is not available on the autosum tool? sum average if max
Answers: 3
You know the right answer?
Write the definition of a class ContestResult containing:An data member winner of type string , init...
Questions
question
Mathematics, 02.03.2021 16:50
question
Mathematics, 02.03.2021 16:50
question
Social Studies, 02.03.2021 16:50
question
Social Studies, 02.03.2021 16:50
question
Social Studies, 02.03.2021 16:50
question
Physics, 02.03.2021 16:50
Questions on the website: 13722363