Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Greeting ( ) : Greeting ( ) is called from the main method. It asks the customer for To enhance their services Palette Perfection company

Greeting(): Greeting() is called from the main method. It asks the customer for
To enhance their services Palette Perfection company would like to add the paint
estimator feature to their application to calculate the total cost of the paint job. The paint
Company has determined that for every 115 square feet of wall space, one gallon of paint
and 8 hours of labor will be required. The company charges $18 per hour for labor and
$53.35 per gallon.
As before, the application starts by displaying a greeting message and asks for the name
of the customer. All subsequent messages need to address the customers by their names.
The application will ask the customer for the number of rooms to be painted. For each
room, the application will ask the customer to provide the total surface area in square feet
of wall space to be painted. The application will then calculate the following
The total surface area to be painted,
The number of paint gallons required to paint the total surface area.
The total cost for the paint gallons
The total hours of labor,
The cost of labor for the painting job, and
The overall cost of the painting job.
The application will then display a report addressing the customer by their name and
listing all calculated values
Before the application quits, it will issue a customized "thank you" message to the
customer. The application needs to validate all numeric values input by customer and in
case of wrong input value the application must give an error message and ask the
customer to input the values again. Your program needs to include at least the following
methods:
their name and prints a greeting message and returns the name to the main
method.
getNumRoom(): getNumRoom() takes in the customer's name as a string and
reads from the customer the number of rooms that the customer wants to paint.
If the customer enters a number less than 1, getNumRoom() will repeatedly ask
the customer for a valid value and only returns a valid value for the number of
rooms.
getRoomArea(): getRoomArea() takes in as a parameter a string representing the
message to be printed to the user customer and reads in the surface area of the
wall space for a given room. If the customer enters an invalid value, getRoomArea
will repeatedly ask the customer for a valid value and only returns a valid value
for the surface area of the wall space.
getRoomDetails(): getRoomDetails() takes the customer's name as an input
parameter as a string and calls getNumRoom() to read in the number of rooms.
Then it asks the customer for the surface area of each room using
getRoomArea(). getRoomDetails() returns the total surface area of all the rooms
entered by the customer.
displayReport(): Takes the following values as parameters
the total area of the wall space,
the total number of gallons required,
the total cost for purchasing the gallons,
the total number of labor hours
the total cost for labor
the overall cost of the painting job
The method will print a report listing all the previous values addressing the customer by name
thankYou(): takes in the name of the customer as an input parameter and prints a
customized thank you message to the customer.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions