Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1: A Company manufactures traffic cones. The company is preparing to bid on a project that will require it to paint its cones in

Question 1: A Company manufactures traffic cones. The company is preparing to bid on a project that will require it to paint its cones in different colors. It also wants to estimate the total cost from the area to be painted. The company has hired you to write a program in C++ that will compute the surface area of a cone and the cost of painting it given its radius, its height, and the cost per square foot of three different colors of paint. Requirements: A typical cone is 30 inches high and 8 inches in diameter. The orange paint costs 30.5 rupees per square foot; the blue costs 15.25 rupees; and the green costs 20.75 rupees. The area of a cone (not including its base, which won't be painted) equals Surface Area = r (r2 + heightInFeet), where r is the radius of the cone and h is its height. One feet = 12 Inches Output: The surface area of the cone in square feet, and the costs of painting the cone in the three different colors, must be displayed in floating point form to three decimal places.

a) : If you buy a 40GB hard drive, then chances are that the actual storage on the hard drive is not 40GB. This is due to the fact that, typically, a manufacturer uses 1000 bytes as the value of 1K bytes, 1000K bytes as the value of 1MB, 1000MB as the value of 1GB. Therefore, a 40GB byte hard drive contains 40,000,000,000 bytes. However, in computer memory, 1KB is equal to 1024 bytes, and so on. So the actual storage on a 40GB hard drive is approximately 37.25GB. Write a program in C++ that prompts the user to enter the size of the hard drive specified by the manufacturer, on the hard drive box, and outputs the actual storage capacity of the hard drive.

b): A room has one door, two windows, and a built-in bookshelf and it needs to be painted. Suppose that one gallon of paint can paint 120 square feet. Write the program in C++ that prompts the user to input the lengths and widths of the door, each window, the bookshelf; and the length, width, and height of the room (in feet). User will also provide the area in square feet painted with one gallon of paint. The program should output the total amount of paint needed to paint the walls of the room, the doors and both windows separately.

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions