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 08:10
Ihave a music player on my phone. i can buy songs, add them to playlists and play them. obviously it would be redundant to store each song in each playlist; each playlist is just a list of pointers to the songs. for this lab you will simulate this behavior. your program will need to have options to: add songs to the system library (you will store the text of the first line of the song, rather than the audio) add playlists add songs to a playlist list playlists play a playlist list all of the songs in the library with a count of how many times each song has been played remove a song from a playlist remove a playlist remove a song from the library (and thus from all playlists that contain it) note that we will not be checking many error cases. in real programming this would be bad, you should usually try to recognize and respond to as many types of errors as you can. in the context of class we are trying to acquaint you with as many concepts as possible, so for the sake of educational efficiency we will not be checking most errors in this lab, you may assume that your user provides correct input. you may add all appropriate error testing if you wish, but we will not be testing for it.
Answers: 2
question
Computers and Technology, 22.06.2019 12:40
In a response of approximately 50 words, explain why it would be essential for the successful a/v technician to participate in additional coursework, presentations and seminars offered by equipment manufacturers as well as annual conferences attended by colleagues in the industry.
Answers: 1
question
Computers and Technology, 23.06.2019 01:50
Free points just awnser this. what should i watch on netflix
Answers: 2
question
Computers and Technology, 23.06.2019 11:50
While preforming before operation pmcs, you notice the front right tire appears slightly under-inflated. what is the proper action?
Answers: 3
You know the right answer?
Write the definition of a class ContestResult containing:An data member winner of type string , init...
Questions
Questions on the website: 13722363