Question: On JGrasps please using java 1. Skills Demonstrated: Utilize switch decision statement. Format double numbers to a fixed decimal point value. Ability to use the
1. Skills Demonstrated: Utilize switch decision statement. Format double numbers to a fixed decimal point value. Ability to use the JOption Pane Class, program documentation with comments, readability with indentation and blank lines, and create variables. Follow naming conventions. 2. Instructions: Morning Brew Coffee Shop has a frequent buyer awards program for its customers based on the number of coffees they purchased each month. The scale to earn Award points follows: If a customer has not purchased any cups, they have earned 0 points. If a customer purchased 1 cup, they have earned 4 points. If a customer purchased 2 cups, they have earned 9 points. If a customer purchased 3 cups, they have earned 15 points. If a customer purchased 4 or more cups, they have earned 5.7 points per cup purchased (number of cups * 5.7) Write a program that utilizes dialog boxes and asks the user to enter the number of cups that they have purchased this month. Utilizing a switch statement, the program will then display, using dialog boxes, the number of cups purchased and the number of points awarded. Use the String.format Method to format the number of points to within 1 decimal place
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
