Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

\f\f

Answered: 1 week ago