Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in C++ please Assignment 2 - Review Note: assignment is to be completed individually. This Assignment has 2 parts. Part 1: Write a program that

in C++ please

image text in transcribedimage text in transcribed

Assignment 2 - Review Note: assignment is to be completed individually. This Assignment has 2 parts. Part 1: Write a program that performs a survey tally on beverages. The program should prompt for the next person until a sentinel value of 1 is entered to terminate the program. Each person participating in the survey should choose their favorite beverage from the following list: 1. Coffee 2. Tea 3. Coke 4. Orange Juice Sample Run: Please input the favorite beverage of person \# 1: Choose 1, 2, 3, or 4 from the above menu or 1 to exit the program 4 Please input the favorite beverage of person \#2: Choose 1, 2, 3, or 4 from the above menu or -1 to exit the program 1 Please input the favorite beverage of person \#3: Choose 1, 2, 3, or 4 from the above menu or 1 to exit the program 3 Please input the favorite beverage of person \#4: Choose 1, 2, 3, or 4 from the above menu or 1 to exit the program 1 Please input the favorite beverage of person \#5: Choose 1, 2, 3, or 4 from the above menu or 1 to exit the program 1 Please input the favorite beverage of person \#6: Choose 1, 2, 3, or 4 from the above menu or -1 to exit the program 1 The total number of people surveyed is 5 . The results are as follows: Beverage Number of Votes Coffee 3 Tea 0 Coke 1 Orange Juice 1 Part 2: Write a program that prompts the user for the number of tellers at Nation's Bank in Hyatesville that worked each of the last three years. For each worker the program should ask for the number of days out sick for each of the last three years. The output should provide the number of tellers and the total number of days missed by all the tellers over the last three years. See the sample output below. Sample Run: How many tellers worked at Nation's Bank during each of the last three years ? 2 How many days was teller 1 out sick during year 1 ? 5 How many days was teller 1 out sick during year 2 ? 8 How many days was teller 1 out sick during year 3 ? 2 How many days was teller 2 out sick during year 1 ? 1 How many days was teller 2 out sick during year 2 ? 0 How many days was teller 2 out sick during year 3 ? 3 The 2 tellers were out sick for a total of 19 days during

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

More Books

Students also viewed these Databases questions

Question

b. Why were these values considered important?

Answered: 1 week ago