Question: Java The program will prompt the user to enter four values (in the following order): a. The selected type of gasoline (a character) b. The

Java

The program will prompt the user to enter four values (in the following order): a. The selected type of gasoline (a character) b. The number of gallons the customer is purchasing (a positive integer value) c. Whether or not the customer has a rewards ID (a character) d. The customer's rewards id if they have one (a positive integer) It will then process that customer information and display the results. 4. The program will compute the total cost of gasoline for the customer, based on the selected type of gasoline code, plus gas tax, using the following information. NOTE: you must handle both lower and uppercase letters for the code. Code 'r' (regular): $3.89 per gallon, plus $0.494 per gallon Code 'm' (midgrade): $4.09 per gallon, plus $0.494 per gallon Code 'p' (premium): $4.29 per gallon, plus $0.494 per gallon 5. For each customer, the program will display a summary with the following information: a. The customer's selected gas type code b. The customer's rewards ID c. The number of gallons the customer is purchasing d. The total purchase price of gas (# of gallons + tax) e. The number of rewards points earned for the customers purchase All output will be appropriately labeled and formatted.

The maximum number of rewards points the customer can earn per-purchase is 10 points (1 point per gallon). The program will only calculate rewards points for the customer IF they enter in Y. Provide at least 9 runs of your program ensure you are testing all cases including edge cases

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!