Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a Java program to do the following: A energy drink company recently surveyed 20,000 customers and found that 17 % of those surveyed
Create a Java program to do the following: A energy drink company recently surveyed 20,000 customers and found that 17 % of those surveyed purchase one or more energy drinks per week. Of those who purchase those energy drinks, 25% prefer lemon-lime flavored drinks. Write a program that displays the following: Ask the user for the number of customers surveyed, the percent who drink energy drinks, and the percent of those people who prefer lemon-line flavored drinks. Display the above numbers. Compute and display the number of customers in the survey who purchase one or more energy drinks per week. Compute and display the number of customers who prefer lemon-lime flavored drinks. Display the above information with appropriate description. For example, do not just display: 20000. Instead display: The number of customers surveyed: 20000 I want to see appropriate comments throughout! Naming: Name the Java project: LastFProjectAssign02 Name the public class: LastFAssign02 (This will be the name of the .java file.) Where Last is your last name and F is the first initial of your first name Save in a file folder on your storage device. Add 3 comments at the top of the page with your name, the class, and the date. Test the program and make sure it runs. When ready to submit, upload the .java file. (LastFAssign02.java) If you can, do this on your personal computer to make sure your software is loaded correctly. The output should look something like this: How many people were surveyed? 20000 What percent drink energy drinks? 17 What percent prefer lemon-lime? 25 The number of customers surveyed: 20000 The percent of customers who drink energy drinks are: 17.0 The percent of customers who prefer lemon-lime are: 25.0 The number of customers who drink energy drinks are: 3400.0 The number of customers who prefer lemon-lime are: 850.0
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