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 07:30
What type of computer network ensures high security ?
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
The three logical operators used to write compound conditions are "and," "or," and "not." a: true b: false
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
Which feature of a blog to restore and retrieve older post
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
History, 13.11.2020 02:00
question
Chemistry, 13.11.2020 02:00
question
Mathematics, 13.11.2020 02:00
question
Mathematics, 13.11.2020 02:00
question
Mathematics, 13.11.2020 02:00
Questions on the website: 13722359