Question 46 (15 points) Complete the following java code as stated below: import java.util.Scanner; public class...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Question 46 (15 points) Complete the following java code as stated below: import java.util.Scanner; public class Example { //----- //This program reads the amount of money spent by customers and calculate the //bonus paid to them. It also assigns a level based on their spending. public static void main (String[] args) { int Level; int Spent = 0; double Total bonus: final double bonus1 = 0.20; // 20% bonus final double bonus2 = 0.10; // 10% bonus final double bonus3 = 0.05; // 5% bonus while (Spent >= 0) // end input when negative amount is entered { Scanner scan = new Scanner (System.in); (Alt + A) System.out.print ("Enter amount of money spent:") Spent scan.nextInt(); // Give the amount spent // Complete this program by adding code to show the bonus obtained by the customers // Customers that spend $4000 or more get bonus1 = 20% of money spent and their level is 1 // Customers that spend between $2000 and $4000 get bonus2 = 10% of money spent and their level is 2 // All other customers get bonus3 = 5% of money spent and their level is 3 // Write the output showing the customer level, the amount spent and the bonus. // COMPLETE THE JAVA CODE BELOW: Question 46 (15 points) Complete the following java code as stated below: import java.util.Scanner; public class Example { //----- //This program reads the amount of money spent by customers and calculate the //bonus paid to them. It also assigns a level based on their spending. public static void main (String[] args) { int Level; int Spent = 0; double Total bonus: final double bonus1 = 0.20; // 20% bonus final double bonus2 = 0.10; // 10% bonus final double bonus3 = 0.05; // 5% bonus while (Spent >= 0) // end input when negative amount is entered { Scanner scan = new Scanner (System.in); (Alt + A) System.out.print ("Enter amount of money spent:") Spent scan.nextInt(); // Give the amount spent // Complete this program by adding code to show the bonus obtained by the customers // Customers that spend $4000 or more get bonus1 = 20% of money spent and their level is 1 // Customers that spend between $2000 and $4000 get bonus2 = 10% of money spent and their level is 2 // All other customers get bonus3 = 5% of money spent and their level is 3 // Write the output showing the customer level, the amount spent and the bonus. // COMPLETE THE JAVA CODE BELOW:
Expert Answer:
Answer rating: 100% (QA)
Here is the complete code as per the instructions given in the image import javautilScanner public class Example public static void mainString args in... View the full answer
Related Book For
Basic Business Statistics Concepts And Applications
ISBN: 9780132168380
12th Edition
Authors: Mark L. Berenson, David M. Levine, Timothy C. Krehbiel
Posted Date:
Students also viewed these programming questions
-
Could you please help complete the following java code. Help is needed where //*** is throughout the code. import java.util.Arrays; import java.util.Random; import java.util.Scanner; // // Project 3...
-
Giving a suitable example, explain the effect in C++ of qualifying a member function (method) with virtual. [3 marks] (e) Recode the following Java code in C++. Minor syntactic errors will not be...
-
When the wavelength of radiation falling on a metal is changed from 500 nm to 200 nm, the maximum kinetic energy of the photoelectrons becomes three times larger. The work function of the metal is...
-
Banko Inc. manufactures sporting goods. The following information applies to a machine purchased on January 1, 2018: Purchase price......................................$ 70,000 Delivery...
-
Mr. Higgins operated a used car dealership in the state of Alabama. Higgins purchased a Chevrolet Corvette. He paid for the car with a draft on his account at the First State Bank of Albertville....
-
Meghann Patrick is a former employee of Altria Group Distribution Company. After her employment was terminated, Patrick sued Altria and a supervisor at Altria, alleging employment-related claims...
-
Depreciation ComputationAddition, Change in Estimate In 1983, Abraham Company completed the construction of a building at a cost of $1,900,000 and first occupied it in January 1984. It was estimated...
-
Consider a web system for online shopping that will generate an ID for each order. The order ID is a sequence of 7 characters where each char- acter could be either one of the 26 upper case English...
-
please explain the optimum results (the values populated in the grey-highlighted cells) discuss the model used, the routes chosen and not chosen. Lastly, create a network diagram that best describes...
-
McDonald's reinvented its customers' digital experience - and its project govern - in less than a year . (BY SARAH FISTER GALE , PORTRAITS BY SAM GRANT ) Questions . Answers are to be brief . 1. Why...
-
How do you think project communications itself enabled the effective management of the project, in alignment to organizational strategy. Your analysis should reflect as to how communications...
-
Almost all projects have some impact on the environment. Current concern of environmental quality requires the environmental clearance for all projects. Therefore environ impact analysis needs to be...
-
The scenario I have is that I have a furniture company based in the United States. We are exploring global strategy. I have chosen UAE as the location for our global expansion. My questions are: Why...
-
Questions 1 What is a CPM and state its use? What is PERT and state its use Discuss similarities and differences of between CPM and PERT Question 2 The ABC company is planning to purchase a machine...
-
Let Q ( x , y ) be the statement " x + y = x y ." If the domain for both variables consists of all integers, what are these truth values? y xQ ( x , y )
-
Feller Company purchased a site for a limestone quarry for $100,000 on January 2, 2019. It estimate that the quarry will yield 400,000 tons of limestone. It estimates that its retirement obligation...
-
Given the results from Problem 11.34, a. At the 0.05 level of significance, is there an effect due to factor A? b. At the 0.05 level of significance, is there an effect due to factor B? c. At the...
-
Download and examine the U.S. Census Bureau's "2007 Survey of Business Owners and Self-Employed Persons," directly available at bhs.econ.census.gov/BHS/SBO/ sbo1_07.pdf or through the Get Help with...
-
Problem 1.27 on page 14 describes a survey of 62 undergraduate students (stored in ). For these data, for each numerical variable, decide whether the data are approximately normally distributed by a....
-
Figure P19.4 shows two hot streams and two cold streams for heat integration (subject to \(\Delta T_{\min }=20^{\circ} \mathrm{C}\) ). (i) What are the energy targets? (ii) Show a network design...
-
Figure P19.5 shows an existing design of a process plant, containing two exothermic processes. These require streams of reactants as shown in the diagram, and produce products at the temperatures...
-
Recalculate the problem in P19.5 using a \(\Delta T_{\min }=10{ }^{\circ} \mathrm{C}\). Comment on the effect of reducing the minimum temperature difference. [ (a) \(T_{\mathrm{C}_{\text {pinch...
Study smarter with the SolutionInn App