Question: WRITE IN JAVA PLEASE In this assignment you are to write a program that will calculate and print to the screen the number of gallons
WRITE IN JAVA PLEASE
In this assignment you are to write a program that will calculate and print to the screen the number of gallons of paint needed to paint a room.
- A gallon of paint will cover 400 square feet
- A door has an area of 20 square feet
- A window has an area of 15 square feet
Your program must ask the user to enter the following information, and save the values entered into variables (use the names below):
- double roomLength
- double roomWidth
- double roomHeight
- int numberOfDoors
- int numberOfWindows
Here is a sample input/output:
Example #1:
Please enter the length of the room: 12.5 Please enter the width of the room: 10.0 Please enter the height of the room: 7.5 Please enter the number of windows: 3 Please enter the number of doors: 2
Square Feet: 252.5 Gallons Needed: .63125
Example #2:
Please enter the length of the room: 20.0 Please enter the width of the room: 30.0 Please enter the height of the room: 8 Please enter the number of windows: 4 Please enter the number of doors: 2
Square Feet: 700 Gallons Needed: 1.75
Name your program: Paint_yourInitials.java (yourInitials represents your initials).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
