Write a full class definition for a class named ContestResult, and containing the following members: – A data member winner of type string, initialized to the empty string. – A data member secondPlace of type string, initialized to the empty string. – A 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.

Write a full class definition for a class named ContestResult, and containing the following members: – A data member winner of type string, initialized  to the empty string. – A data member secondPlace of type string, initialized to the empty string. – A 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.

LANGUAGE: C++

CHALLENGE:

Write a full class definition for a class named ContestResult, and containing the following members: – A data member winner of type string, initialized to the empty string. – A data member secondPlace of type string, initialized to the empty string. – A 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 content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level