Specific directions | Computer Science homework help

PROGRAM DESCRIPTION

RATS! You thought everything was going great in the painting design for Program #2’s small cabin, but as often happens, the user has changed his/her mind! Windows are to be added after all, so now you need less paint and have to buy some windows, instead.

SPECIFIC DIRECTIONS
In Program #2, you calculated the amount of wall & ceiling area to determine how much paint to buy, and you planned to paint the entire surface. Several changes are now needed: a specified number of windows will be planned for; and the ceiling will not be painted—too drab! Since your program will grow, there’s no better time than now to keep the design simple by incorporating functions wherever possible. Your new, improved version will use two functions to keep the logic as logical as possible!

The house specifics: still a simple rectangular structure, but now you’re only concerned with the wall surfaces—the ceiling will be handled elsewhere. You’ll still need to request the length, width, and height of the structure. Do that in main(). But, then, you’ll call two separate functions to calculate most of the details. We want to know what the total wall surface area is, how many windows are allowed/desired, and finally how much paint will be needed.

Use the following functions, by name, in your design for this program.

main: As usual. You may do all input and output in main.

calc_area: Calculate the total surface area of the walls and return the answer to main. (You’ll need

to decide which variable values need to be “sent in” to this function.)

calc_windows: Calculate and return how many windows are recommended for environmental reasons.

Use this rule: a maximum of one window for every 150 square feet of wall surface area.
(Do not recompute the area here—it was already done in calc_area.) (Hint: the answer certainly must be an even number of windows!)

Plan on installing as many windows as possible. For every window, subtract 18 square feet of area, then calculate the final paint requirements as in Program #2: 1 gallon covers 350 square feet.

After computing all the requirements, display the final painting plan for the house: the total wall surface area to be painted; number of windows to be installed; and number of gallons of paint required. In this program you must be realistic about your answers: if, for example, you calculate 4.7 windows, then certainly only 4 windows are allowed; and if you determine that 5.2 gallons of paint are needed, then 6 gallons must be purchased!

Save your program as: prog3-ii.cpp, where the letters “ii” are replaced by your own initials.

Calculate the price of your order

Select academic level, specify pages, and choose your desired paper type. Choose the deadline for your order.
To reduce the cost of our essay writing services, select the lengthier deadline.
We can't believe we just said that to you.

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Complimentary cover page and references
  • Assurance of plagiarism-free content
  • Money-back guarantee for your satisfaction
  • Unlimited revisions
  • 24/7 customer support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Referencing styles: APA, MLA, HARVARD, CHICAGO/TURABIAN, and IEEE

Our guarantees

Delivering exceptional quality at an affordable price is just the beginning.
We offer 5 advantageous guarantees to ensure a seamless, gratifying, and secure experience.

Money-back guarantee

Our commitment to quality allows us to offer a money-back guarantee, ensuring transparency and your utmost satisfaction.

Read more

Plagiarism-Free Assurance

Every paper is crafted from scratch and rigorously scrutinized through advanced plagiarism-detection software, eliminating all possibilities of plagiarism.

Read more

Unlimited Revisions

Our free revisions guarantee ensures your satisfaction. We refine your paper until you are entirely content, ensuring peace of mind.

Read more

Stringent Privacy Measures

Your emails security adheres to international data protection regulations, and trustworthy payment systems safeguard your financial details.

Read more

Equitable Collaboration

Entrusting us with your funds means acquiring a service backed by expertise. Explore our comprehensive terms and conditions for transparent business interactions.

Read more

Why Expert Academic Writers is the No.1 Essay Writing Service for Students

  1. Custom-written and plagiarism-free papers
  2. Timely delivery
  3. Customer satisfaction
  4. Confidentiality
  5. Highly trained authors
  6. Affordable prices

Let Professionals Take Care of your Academic Paper