Question
This assignment requires a C++ program be written to perform a vote counting and tallying procedure to gauge favorite holiday destinations of individuals. It should
This assignment requires a C++ program be written to perform a vote counting and tallying procedure to gauge favorite holiday destinations of individuals. It should present the user with the question and a "ballot" of 5 holiday destinations and an exit/quit option. Once the program is started, it should allow the user to vote multiple times (same as in multiple users using the program to vote).
The program should start with a program title and brief instructions on how to vote. It should then ask the user to select an item (vote) from a group of items that are presented. You should use your own choice of holiday destinations.
After a vote is cast, incorporate a loop that will allow a new vote to be cast. Keep counters for valid and invalid votes as well as for individual item votes. Print a message informing the user whether that the vote was valid or invalid (No second chance provided to a voter even if the vote is invalid).
For example, the voting options might look like:
*********** FAVORITE HOLIDAY DESTINATION OPINION POLL *********** 1. London
2. Paris
3. Rome
4. Sydney
5. New Zealand 6. Quit voting
Please choose your favorite holiday destination from the list above by number.
Note that the sixth menu item is the option to quit voting. If this option is selected, voting results (as discussed in the next paragraph) need to be printed before the program terminates.
Once the voting has been completed, calculate the percentage received for each item. Print the total number of votes, individual votes for each item, and percentages in an easy to read table. The program should also report the number of invalid votes received.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started