Answered step by step
Verified Expert Solution
Link Copied!

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 350 square feet and the price per gallon is $53.35.
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 ft :
surface area =2 width height +2 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 sq.ft painted by one gallon ~|
Note that |~x~| means the ceiling of x
Calculates the expected purchase price. To calculate the expected price, you can
use the formula:
purchase price = price per gallon number of 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.
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

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions