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
-
Using the information in the two figures below and assuming that the risk free rate is 3.8% and the market risk premium is 7% calculate the beta for Ciena Question 6 options: 1.1 2.8 0.9 2.4 Using...
-
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: The length of time (in months) between the...
-
Identify any vertices in Graph \(V\) that are not adjacent. Use the figure showing Graphs \(S, T, U, V\), and \(W\). b d Graph S e Graph T e Graph U b a e Graph V e b Graph W e
-
Graph 17, vertex \(a\) List all the distinct Hamilton cycles beginning at the given vertex in the given graph. Indicate which pairs of Hamilton cycles are reverses of each other. 9.3 1.5 13.3 5.2 8.7...
-
Miller Cereals is a small milling company that makes a single brand of cereal. Recently, a business school intern recommended that the company introduce a second cereal in order to "diversify the...
-
General Matters outstanding bond issue has a coupon rate of 11.2%, and it sells at a yield to maturity of 9.00%. The firm wishes to issue additional bonds to the public at face value. What coupon...
-
Fill in the Blank Question Accrual adjustments include either a debit to a ( n ) account and a credit to a liability account OR a debit to an asset account and a credit to a ( n ) account. Deferral...
-
Daley, Inc. is a privately held furniture manufacturer. For August 2017, Daley had the following standards for one of its products, a wicker chair: (Click the icon to view the standards.) (Click the...
-
a firm used the periodic system to account for inventory. On its 2 0 2 6 balance sheet, the firm reports total inventory of $ 1 2 0 , 0 0 0 and $ 1 0 0 , 0 0 0 respectively as beginning and ending...
-
i.Assume the risk-free rate of return is 3% and the risk premium is 9%, calculate the required return for stocks A, B, and C. (3 marks) ii.Draw the security market line and identify the under value,...
-
For f(x) = x + 5 and g(x) = 2x+2, find the following functions. a. (f g)(x); b. (g f)(x); c. (fog)( 1); d. (g o f)( 1)
-
The following information is taken from the record of Maximus Limited for the year ended 30 June: Operating profit before income tax $560000 Items included in operating profit before income tax...
-
need help asap.. On January 1, 2020, Claude Company purchased a patent from Dexter Company for P400,000. Dexter has held this patent for 5 years. Claude estimates that the patent has a remaining...
-
Catalytic hydrogenation of naphthalene over PdC results in rapid addition of 2 moles of H 2 . Propose a structure for this product.
-
a. Better synchronization of cash inflows and outflows would allow the firm to keep its transactions balance at a minimum, and would therefore lower the target cash balance. b. Improved sales...
-
From an employer's standpoint, the defined benefit plan's major advantage is promotion of low employee turnover. The economic consequences of job-changing are not desirable under a defined benefit...
-
Ideally, the employee will choose the plan that provides the incremental cash flows (both costs and benefits) that maximize the employee's expected utility of consumption. However, there are many...
Study smarter with the SolutionInn App