area. Total cost includes paint and sales tax. Note: This program is designed for incremental development....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. Write a program to calculate the cost to paint a wall. Amount of required paint is based on the wall 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\n", 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.0 sq ft Step 2 (2 pts). Calculate and output the amount of paint needed to three decimal places. One gallon of paint covers 350 squar 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.0 sq ft Paint needed: 0.514 gallons 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 celo to round up to the nearest gallon and convert to an integer. Submit for grading to confirm 4 tests pass. Ex If the input is 12.0 15.0 29.95 the output is Wall areal 180.0 sq ft Paint needed: 0.5142 gallons : Cans needed: 1 can (a) Step 4 (4 pts). Calculate and output the paint cost, sales tax of 7%, and total cost. Dollar values are output with two decimal places Submit for grading to confirm all tests pass Ex: If the input is: 8.0 8.0 49.20 the output is: Wall area: 64.0 sq ft. Paint needed: 0.183 gallons Cans needed: 1 can (a) Paint cost: $49.20 Sales tax: $3.44 Total cost: 552.64 Adat LAB ACTIVITY 2.31.1: LAB Program: Painting a wall 1 #include <iostream> 2 #include <iomanip> 3 #include <cmath> 4 using namespace std; 5 6 int main() { 7 8 9 10 1 11 Type your code here. / return 0; Develop mode Submit mode main.cpp // needed for setprecision() and fixed // needed for ceil() Enter program input (optional) If your code requires input values, provide them here. 0/10 Load default template... Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box 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. Write a program to calculate the cost to paint a wall. Amount of required paint is based on the wall 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\n", 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.0 sq ft Step 2 (2 pts). Calculate and output the amount of paint needed to three decimal places. One gallon of paint covers 350 squar 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.0 sq ft Paint needed: 0.514 gallons 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 celo to round up to the nearest gallon and convert to an integer. Submit for grading to confirm 4 tests pass. Ex If the input is 12.0 15.0 29.95 the output is Wall areal 180.0 sq ft Paint needed: 0.5142 gallons : Cans needed: 1 can (a) Step 4 (4 pts). Calculate and output the paint cost, sales tax of 7%, and total cost. Dollar values are output with two decimal places Submit for grading to confirm all tests pass Ex: If the input is: 8.0 8.0 49.20 the output is: Wall area: 64.0 sq ft. Paint needed: 0.183 gallons Cans needed: 1 can (a) Paint cost: $49.20 Sales tax: $3.44 Total cost: 552.64 Adat LAB ACTIVITY 2.31.1: LAB Program: Painting a wall 1 #include <iostream> 2 #include <iomanip> 3 #include <cmath> 4 using namespace std; 5 6 int main() { 7 8 9 10 1 11 Type your code here. / return 0; Develop mode Submit mode main.cpp // needed for setprecision() and fixed // needed for ceil() Enter program input (optional) If your code requires input values, provide them here. 0/10 Load default template... Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box
Expert Answer:
Answer rating: 100% (QA)
Step 1 include include include using namespace std int main declare variables double wallHeight wallWidth costOfOneCan wallArea rad wall height width and cost of one can of paint cin wallHeight wallWi... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Write a program to calculate U.S. income tax owed given wages, taxable interest, unemployment compensation, status (dependent, single, or married), and taxes withheld. Dollar amounts are displayed as...
-
Busaba Domitila (Domi) invented a new digital camera and data-storage system that is smaller than a grain of rice. She has named it The Camerice. She designed a unique typeface and logo for all...
-
Make a program to play an automated dice game that uses two dice (GVDie class provided). Done in JAVA with COMMENTS added please A program to play an automated dice game that uses two dice (GVDie...
-
The following information was drawn from the 2016 accounting records of Ozark Merchandisers: 1. Inventory that had cost $21,200 was sold for $39,900 under terms 2/20, net/30. 2. Customers returned...
-
In Fig P2.93 a one-quadrant spherical shell of radius R is submerged in liquid of specific weight γ and depth h > R. Derive an analytic expression for the hydrodynamic force F on the shell and...
-
Cintas designs and manufactures uniforms for corporations throughout the United States and Canada. The company's stock is traded on the NASDAQ. Selected information from the company's financial...
-
Distinguish between shaft work and other kinds of work associated with a flowing fluid.
-
Draw a decision table for the reimbursement policy in Problem 1.
-
The Law Society of Ontario (LSO) has brought an application alleging that John Clarke, a paralegal, failed to maintain books and records as required by By-law 9. The LSO also asserted that the...
-
1. How will you characterize Tupperwares distribution strategy in relation to the theoretical models? 2. What are the advantages and disadvantages of Tupperwares distribution model? 3. How do you...
-
c) Using the configuration shown in Fig Q5(c), design a feedback amplifier with a closed loop gain of 10. Use small signal transistors having hfe=100 and a 30 volt supply. Justify all steps in your...
-
Discuss the impact of globalization on small businesses in developing countries. Analyze the advantages and disadvantages of globalization for small businesses, and provide recommendations for...
-
Identify and explain two ( 2 ) ethical practice considerations that need to be taken into account in marketing and communication.
-
Define personal financial planning. What types of decisions are involved in a personal financial plan? How can an application of personal finance skills increase your wealth? How can your post-high...
-
Ash is a physiotherapist, earning 31,200 a year after deductions for tax, National Insurance and pension contributions. He is about to move into a flat with his partner Chris, who has a young child,...
-
The financial management of a domestic company differs from that of an international company on different factors and parameters. Discuss.Distinguish between the spot exchange rate, and the forward...
-
The figure below shows the balance, P, in a bank account. P (dollars) a = P = f(t) (5, 7000) (1, 4000) t (years) (a) Find a possible formula for P = f(t) = ab' assuming the balance grows...
-
Starr Co. had sales revenue of $540,000 in 2014. Other items recorded during the year were: Cost of goods sold ..................................................... $330,000 Salaries and wages...
-
Mary paid $2,000 of state income taxes in 2012. The total sales tax she paid during 2012 was $5,500, which included $3,000 for the cost of a new car. How should Mary treat the taxes paid on her 2012...
-
How much of each of the following prizes or awards is taxable? a. Cheline received a $50,000 gift bag at the Oscars in 2012. b. Jon received a gold watch worth $350 for 25 years of service to his...
-
John Fuji (age 37) moved from California to Washington in December 2011. He lives at 468 Cameo Street, Yakima, WA 98901. John's Social Security number is 571-78-5974 and he is single. His earnings...
-
Why is wage and price flexibility crucial to the idea of the invisible hand?
-
Here are some macroeconomic data for the country of Oz for the years 2014 and 2015. As the data suggest, Oz produces only potatoes, and its monetary unit is the shekel. Calculate each of the...
-
Graph the behavior of the civilian unemployment rate from 1961 until the present using monthly data. Can you see the periods of recession that occurred in 19691970, 19731975, 1980, 19811982,...
Study smarter with the SolutionInn App