I am struggling with understanding how to code the calculations for these test cases. Math has not always been my strong suit but I am determined to learn the best way I can. Any guidance would be very much appreciated.  Programming Language: C++ I need to first calculate the area of the four walls the user will need. Then I need to subtract the door and window area. Then I am supposed to add in the ceiling area to be painted.   My calculations need to show the total square footage to be painted, and percent that is excluded for the doors and windows, and area of ceiling to be painted. Lastly, I need to show the user the total gallons calculated and round that number up to the number of gallon cans of paint needed. This is the 1st test case I need to test within my code: Room is 14 ft long and 12 ft 8 in wide and 8 ft high.  Coverage is 250 ft2/gallon. Percent not painted = 15, ceiling is not painted.   2nd test case for testing with the code:    Room is 25 ft 6 in long and 23 ft 9 in wide and 10 feet high.  Coverage is 200 ft2/gallon, Percent not painted = 12, ceiling is painted.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I am struggling with understanding how to code the calculations for these test cases. Math has not always been my strong suit but I am determined to learn the best way I can. Any guidance would be very much appreciated. 

Programming Language: C++

I need to first calculate the area of the four walls the user will need. Then I need to subtract the door and window area. Then I am supposed to add in the ceiling area to be painted.  

My calculations need to show the total square footage to be painted, and percent that is excluded for the doors and windows, and area of ceiling to be painted. Lastly, I need to show the user the total gallons calculated and round that number up to the number of gallon cans of paint needed.

This is the 1st test case I need to test within my code:

Room is 14 ft long and 12 ft 8 in wide and 8 ft high.  Coverage is 250 ft2/gallon.

Percent not painted = 15, ceiling is not painted.

 

2nd test case for testing with the code:   

Room is 25 ft 6 in long and 23 ft 9 in wide and 10 feet high. 

Coverage is 200 ft2/gallon, Percent not painted = 12, ceiling is painted.

Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education