Create a Java program to do the following: A energy drink company recently surveyed 20,000 customers...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Related Book For
Introduction To Statistical Investigations
ISBN: 9781118172148
1st Edition
Authors: Beth L.Chance, George W.Cobb, Allan J.Rossman Nathan Tintle, Todd Swanson Soma Roy
Posted Date:
Students also viewed these programming questions
-
QUIZ... Let D be a poset and let f : D D be a monotone function. (i) Give the definition of the least pre-fixed point, fix (f), of f. Show that fix (f) is a fixed point of f. [5 marks] (ii) Show that...
-
re Regular Languages and Finite Automata (a) Let L be the set of all strings over the alphabet {a, b} that end in a and do not contain the substring bb. Describe a deterministic finite automaton...
-
The formula for the power output P of a battery is P = VI - RI where V is the electromotive force in volts, R is the resistance in ohms, and I is the current in amperes. Find the current that...
-
Refer to Exercise 1.26 and data set EX0126. The lengths of time (in months) between the onset of a particular illness and its recurrence were recorded: Exercise 1.26 The length of time (in months)...
-
Sales revenue $470,800.00 Cost of goods sold 217,766.40 Gross margin $253,033.60 Less: Selling expenses 86,199.20 Administrative expenses 74,942.80 Operating income $91,891.60 What was the sales...
-
A study was conducted to investigate the relationship between severe headaches and being left- or right-handed. (Incidentally, Lisa Kudrow, who played Phoebe Buffay on the hit sitcom "Friends," is an...
-
Use truth tables to determine whether the following pairs of symbolized statements are logically equivalent, contradictory, consistent, or inconsistent. First, determine whether the pairs of...
-
Midnight Sun Apparel Company uses normal costing, and manufacturing overhead is applied to work-in-process on the basis of machine hours. On January 1 of the current year, there were no balances in...
-
You will receive a $110,000 inheritance in 10 years. You could invest that money today at 11% compounded semi-annually. What is the present value of your inheritance?
-
What is information overload? How new a phenomenon is it?
-
What are some advantages of having high selfesteem? What are some drawbacks?
-
What are the benefits and drawbacks of chronological and functional rsums?
-
What can you learn about an employers needs by examining job postings?
-
Why should you try to quantify accomplishments when possible?
-
Critically analyze style vs. no style. Then write a paper explaining why it is better to use a web designer with no style, than a designer with a particular style. Be sure to provide in-depth...
-
At the beginning of its fiscal year, Lakeside Inc. leased office space to LTT Corporation under a seven-year operating lease agreement. The contract calls for quarterly rent payments of $25,000 each....
-
LDDS continued to publicly report increasing profits and sales in the financial statements, which allowed it to acquire more companies with no limit to the growth of its stock price. True/False
-
LDDS suffered from high fixed costs coupled with a lack of technical knowledge and expertise in optimizing the configuration of circuits, which resulted in high line costs. True/False
-
WorldCom overstated its sales by holding its books open at the close of a reporting period. True/False
Study smarter with the SolutionInn App