Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Modify the previous cone program that computes the cost of painting traffic cones in each of three different colors, given the height and diameter of
Modify the previous cone program that computes the cost of painting traffic cones in each of three different colors, given the height and diameter of a cone in inches, and the cost per square foot of each of the paints, all of which are input from a file. Use the file stream identifier as if it were a boolean variable to check an input stream. Do the same for the output stream. Display messages if there is a file reading or file writing error. Hard copy output should show the output of file reading and Modify the program so that it is in divided into modules and code each as a function as follows: create a void function to convert dimensions to feet(call it convertDimension).
Create another function, called calcsurfArea to calculate and return the calculated surface area to caller. create a third void function to compute the red, green, and blue cost. create a fourth function to output results to the screen. Make sure you choose the right types of parameter, prototype, definitions, and for three functions.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started