Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program Specifications Write a program to calculate the cost to paint a wall. Amount of required paint is based on the wall area. Total cost

Program Specifications Write a program to calculate the cost to paint a wall. Amount of required paint is based on the wall area. Total cost includes paint and sales tax.
Note: This program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress.
Step 1(2 pts). Read from input wall height, wall width, and cost of one paint can (doubles). Calculate and output the wall's area to one decimal place using System. out.printf ("Wall area: %.1f sq ft ??
", area) ; Submit for grading to confirm 1 test passes. Ex: If the input is:
12.0,15.0,29.95
the output is:
Wall area: 180.0sq ft
Step 2(2 pts). Calculate and output the amount of paint needed to three decimal places. One gallon of paint covers 350 square feet.
Submit for grading to confirm 2 tests pass.
Ex: If the input is:
12.0,15.0,29.95
the output is:
Wall area: 180.0sqft
Paint needed: 0.514 gallons
Step 3(2 pts). Calculate and output the number of 1 gallon cans needed to paint the wall. Extra paint may be left over. Hint: Use Math.ceil()
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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

How do we do subnetting in IPv6?Explain with a suitable example.

Answered: 1 week ago

Question

Explain the guideline for job description.

Answered: 1 week ago

Question

What is job description ? State the uses of job description.

Answered: 1 week ago

Question

What are the objectives of job evaluation ?

Answered: 1 week ago

Question

Write a note on job design.

Answered: 1 week ago