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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 00:50, AmbitiousAndProud
Representa os dados de um banco de dados como uma coleç? o de tabelas constituídas por um conjunto de atributos, que definem as propriedades ou características relevantes da entidade que representam. marque a alternativa que representa o modelo descrito no enunciado. escolha uma:
Answers: 3
image
Computers and Technology, 23.06.2019 14:30, ladawnrowles005
The option enables you to modify a slide element in most presentation applications.
Answers: 2
image
Computers and Technology, 23.06.2019 15:00, Siris420
Plz ( which is an example of a good url?
Answers: 1
image
Computers and Technology, 24.06.2019 00:20, talyku843
Describe a data structures that supports the stack push and pop operations and a third operation findmin, which returns the smallest element in the data structure, all in o(1) worst-case time.
Answers: 2
You know the right answer?
Write the definition of a class ContestResult containing:An data member winner of type string , init...

Questions in other subjects:

Konu
Mathematics, 14.12.2021 23:20
Konu
History, 14.12.2021 23:20
Konu
Mathematics, 14.12.2021 23:20
Konu
English, 14.12.2021 23:20
Konu
Mathematics, 14.12.2021 23:20