Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java, without switch statements because I haven't learned them yet, please and thank you! Write a program called Survey that tallies the results for

In java, without switch statements because I haven't learned them yet, please and thank you!

image text in transcribed

Write a program called Survey that tallies the results for a beverage survey. The program should prompt the user to enter the beverage number chosen by a survey participant until the user enters alue -1. Once that value has been entered, display the survey results (i.e., the number of times each beverage was chosen). You can assume users enter a valid choice when prompted You will need to create several variables to keep track of the number of times each beverage is chosen. Your output should look similar to the example below. Note: feel free to use beverages of your own choosing. Example 1: 1.Coffee 2.Milk 3.Red Bull 4.Water Please enter the person's choice: 1 1.Coffee 2.Milk 3.Red Bull 4.Water Please enter the person's choice: 3 1.Coffee 2.Milk 3.Red Bull 4. Water Please enter the person's choice: 1 1.Coffee 2.Milk 3.Red Bull 4.Water Please enter the person's choice: 4 1.Coffee 2.Milk 3.Red Bul1 4.Water Please enter the person's choice: -1 Survey Results Coffee 2 Milk 0 Red Bull1 Water 1

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

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions