Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are an employee of the Rainbow Paint Store. For the purposes of this program, the Rainbow Paint Store only sells red and green buckets
You are an employee of theRainbow Paint Store.For the purposes of this program, theRainbow Paint Storeonly sellsredandgreenbuckets of paint.
Your task:
- Ask the customer which paint colour they wish to purchase, and how many buckets of paint are needed. You will need to use a loop with your program to allow the user to make as many purchases of either colour of paint as they wish.
- Establish methods to deal witheachcolour of paint.
- The method ofredpaint: Determines the cost of the pain based upon $21.95 per bucket. Return the total cost to main.
- The method ofgreenpaint: Determines the cost of the pain based upon $19.95 per bucket. Return the total cost to main.
- Establish a 3rd method that just prints the store name (for billing purposes).
- Establish a 4th method that determines the total cost of the customer's order. This method will receive the total individual costs for red and green paint, will compute the final overall cost, and will also add 13% sales tax to the order. Format this receipt into a chart/table (i.e. use System.out.format).
- Establish a 5th method that prints a thank-you message for buying at this store.
- Your main method should keep looping until the user says they do not wish to buy any more paint. Then, after the loop, print a bill for the customer by calling the appropriate methods from main. The bill is to be developed in the following order:
- the store name
- the total cost of each individual paint colour
- the total bill with sales tax
- and a thank you message
- Be sure that all money amounts are printed to two decimal places using a Decimal Formatter.Remember to include headers for each method, a header for the program, and lots of //comments.
*****Don't forget to error-trap any unwanted input******
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Here is the Java program for the Rainbow Paint Store java import javatextDecimalFormat import javautilScanner public class RainbowPaintStore static De...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