Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The purpose of this assignment is to submit a well commented java program that uses an IF statement and number/string comparisons. Instructions Your paint business
The purpose of this assignment is to submit a well commented java program that uses an IF statement and number/string comparisons. Instructions Your paint business is growing leaps and bounds because of your ethical business practices, and partly because of your Java programs that enable you to process data quickly. You suddenly have this business idea of giving discounts on painting orders. You still charge $20 per square meter of painting you do. Your business model is simple; larger the area to be painted, the higher the discount you are willing to give. Given below is the table that you will follow for the discounts. 1. Write a Java program that would be capable of following operations: A. Reads the customer first and last name B. Reads the width and height of the walls with error handling C. Reads the number of walls to be painted with error handling (All walls have equal length, height, and width) D. Calculates the surface area to be painted (should be formatted to 2 decimal places) E. Calculates the cost of painting (should be formatted to 2 decimal places) F. Calculates the discount based on the cost G. Prints a transaction Id as lastName-007-AWESOME-CSE174-firstName (For e.g. is the customer is Deepak Dawar, the transaction id is Dawar-007AWESOME-CSE174-Deepak) 2. Make sure you validate the inputs. For e.g. if an integer is being read, entering a double should not crash the program. This is very important. You will lose 10 points if your program crashes. 3. There are 2 subjective points that I will allot on my discretion. These would depend upon the factors like the indentation of code, choice of variable names, choice of data types, and choice of prompt messages (you should not type - "Enter a number" etc.). So make your code look good and professional. Valued customer name: Deepak Dawar Enter the height: 30 (just a sample, use different values to test your program) Enter the width: 20 (just a sample, use different values to test your program) Enter no. of walls: 10 (just a sample, use different values to test your program) The area to be painted: square meters The cost of painting: dollars (\$) Discount on painting: >% of cost that is of the amount over
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