Question
{Create the following program in Java1} note: use == not .equals, use loops, Do not use .Parse etc Please create as simple as possible. 1.
{Create the following program in Java1}
note: use == not .equals, use loops, Do not use .Parse etc
Please create as simple as possible.
1. From main, write a loop which asks the customer if they would like to order paint. If so, then ask what color they would like. Next ask how many full gallons of that color paint are needed. You will need an if/else statements here to store red gallons of paint separately from green gallons of paint (2 separate variables). Repeat until they no longer are ordering paint.
2. After getting the totals for red gallons and green gallons you will then begin to work on the customers bill. Write the methods below (#3-6) and use them in main as needed to produce the bill (#7).
3. Establish a method to find the total cost of each color of paint (2 methods). Each method will take one parameter with the number of gallons of that color paint. The method will determine the cost of the paint ( $21.95 per red gallon and $19.95 per green gallon). Return the total cost to main and store in a variable.
4. Establish a void method to print the store title for billing purposes.
5. Establish a method that determines a total bill for the customer. This method will receive the totals from the two paint methods, will compute the final total cost, and will add 8% sales tax to the order. Return this final total to main so it can be included in the customers bill.
6. Establish a method to print a thank you message for buying at this store.
7. Print the bill for the customer. The bill is to be arranged in the following order: the store name, the total cost of each paint color, the total bill with sales tax, and the thank you message. Ensure the amount of money is entered as money amounts.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started