Hi, I work at a radio station and recently I want to develop a easier way our viewers get in touch with us. One of the most popular features of a local radio station is the use of indicative opinion polls to reflect their listener’s opinions on current news items and events. The polls ask a question and then four responses. The listener selects the answer which they most favour. We use the polls and results in phone-in programmes to generate interest in certain programmes.
So anyways here's my problem; I want to create a basic poll.
For example -
Question - Which country out of the four would you want to go on holiday too?
Responses USA, Thailand, Greece, Italy
So basically what I'm trying to implement is when the program starts it will display an initial menu screen with the following set of options:
1. Display the current score for each possible response.
3. Quit the program.
Display an error message if an invalid response is entered.
If the user selects option two, the program will display the question and the four possible responses. The user will then enter a response and the response will be recorded in the program. Again display an error message if the response is invalid.
The thing I'm trying to do is create one class with the following data:
Four possible responses
The current score for each response
It should contain the following methods:
A setter and getter for the survey question
Setters and getters for each of the responses
addVotes, which will add one to the score for the specified response.
It's been years since I've last done java and I really need some help, if anyone can point in the right way with the coding that would be great.