Write the definition of a class ContestResult containing: An instance variable winner of type String, initialized to the empty String. An instance variable secondPlace of type String, initialized to the empty String. An instance variable thirdPlace of type String, initialized to the empty String. A method called setWinner that has one parameter, whose value it assigns to the instance variable winner . A method called setSecondPlace that has one parameter, whose value it assigns to the instance variable secondPlace. A method called setThirdPlace that has one parameter, whose value it assigns to the instance variable thirdPlace . A method called getWinner that has no parameters and that returns the value of the instance variable winner . A method called getSecondPlace that has no parameters and that returns the value of the instance variable secondPlace. A method called getThirdPlace that has no parameters and that returns the value of the instance variable thirdPlace. No constructor need be defined.

Write the definition of a class ContestResult containing: An instance variable winner of type String, initialized to the empty String. An instance variable secondPlace of type String, initialized to the empty String. An instance variable thirdPlace of type String, initialized to the empty String. A method called setWinner that has one parameter, whose value it assigns to the instance variable winner . A method called setSecondPlace that has one parameter, whose value it assigns to the instance variable secondPlace. A method called setThirdPlace that has one parameter, whose value it assigns to the instance variable thirdPlace . A method called getWinner that has no parameters and that returns the value of the instance variable winner . A method called getSecondPlace that has no parameters and that returns the value of the instance variable secondPlace. A method called getThirdPlace that has no parameters and that returns the value of the instance variable thirdPlace. No constructor need be defined.

LANGUAGE: JAVA

CHALLENGE:

Write the definition of a class ContestResult containing:
An instance variable winner of type String, initialized to the empty String.
An instance variable secondPlace of type String, initialized to the empty String.
An instance variable thirdPlace of type String, initialized to the empty String.
A method called setWinner that has one parameter, whose value it assigns to the instance variable winner .
A method called setSecondPlace that has one parameter, whose value it assigns to the instance variable secondPlace.
A method called setThirdPlace that has one parameter, whose value it assigns to the instance variable thirdPlace .
A method called getWinner that has no parameters and that returns the value of the instance variable winner .
A method called getSecondPlace that has no parameters and that returns the value of the instance variable secondPlace.
A method called getThirdPlace that has no parameters and that returns the value of the instance variable thirdPlace.
No constructor need be defined.

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