Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Palette Perfection is a new paint shop that provides its customers with a paint gallon calculator program to help them decide on the number of
Palette Perfection is a new paint shop that provides its customers with a paint gallon calculator
program to help them decide on the number of paint gallons that they need to buy. The
manager for Palette Perfection has asked you to write the paint gallon calculator program given
that one gallon can of paint will cover up to square feet and the price per gallon is $
You need to develop a modular program that implements the paint gallon calculator. Your
program will start by asking the customers for their names and print a customized greeting
message. Then the program will ask the customer for the room dimensions and calculates the
surface area of the room and the number of gallons required to paint the room then prints the
total price for purchasing the calculated number of gallons. At the end, the program will issue a
customized "thank you" message to the customer.
Your program MUST include the following methods.
Greeting: Greeting takes in the name of the customer as an input parameter and
prints a customized welcome message
calculatePrintPrice: calculatePrintPrice takes in as parameters the number of square
feet that can be painted by one gallon and the price per gallon. calculatePrintPrice
preforms the following tasks
O Asks the customer for the room dimensions
Calculates the room surface area. You can assume that the room is rectangular.
Thus, the dimensions to calculate the surface area will be the length of the room,
the width of the room and the height of the room wall. You can use the following
formula for calculating the room surface area in sq :
surface area width height length height
Calculates the number of gallons required to paint the room. You can use the
following formula for calculating the number of gallons:
number of gallons ~ surface area number of sqft painted by one gallon ~
Note that ~~ means the ceiling of
Calculates the expected purchase price. To calculate the expected price, you can
use the formula:
purchase price price per gallon number gallons
Prints to the customer a report containing all this information.
thankYou: thankYou takes in the name of the customer as an input parameter and
prints a customized thank you message to the customer.
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