subject

Modify the program so that it includes structs for each of the eight shapes that were the subject of lab 1. Name these as follows: Square, Rectangle, Circle, Triangle, Cube, Box, Cylinder, and Prism. Include attributes of the double data type for the required dimensions for each (for example, length and width for the Rectangle). Provide a descriptive name for each of these data elements (for example, "radius" instead of "r"). Do NOT include any other attributes, and do NOT include any "member functions" -- avoid the temptation to extend the specifications beyond what is required. If you include attributes for area, volume, or perimeter, you are not doing this right! Write supporting functions to do console output each shape (for example, void outputBox(ostream&, const Box&):), which should output to either cout or fout -- whichever is the first parameter in a call, using the same format as v.1. Note that cout is an object of type ostream. So use cout as the first parameter in the function call in order to produce console output. Use the exact same supporting functions for text file output, which should output to fout. Create, open, and close fout in int main. fout is also an object of type ostream. Use any type of array for your bag --C, C++, or STL vector -- your choice. STL vectors track their or size, so if you use a C or C++ Page 1 stead, you'll have to use an int to track size yourself. Write 4 loops -- one to process the input file and fill the bag, one for console output, one for TXT output, and one for deallocation. If you don't have 4 loops, or if you do more than one of these things in any single loop, you're not doing this right!

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:20
Write a javascript program that reads three integers named start, end, and divisor from three text fields. your program must output to a div all the integers between start and end, inclusive, that are evenly divisible by divisor. the output integers must be separated by spaces. for example, if a user entered 17, 30, and 5, your program would output "20 25 30" (without the quotes) because those are the only integers between 17 and 30 (including 17 and 30) that are evenly divisible by 5.
Answers: 2
question
Computers and Technology, 22.06.2019 14:30
What percentage of companies is projected to use social media to locate new employees in 2012
Answers: 2
question
Computers and Technology, 22.06.2019 16:20
Consider the following statements, then select one of the answers below: the signal() function shown below registers "sig_handler()" as the signal handler function for the sigkill signal, without the complexity of using when the sigkill signal is sent to a process running this code, by a user typing "kill -kill ", where the correct process id is used for to target the process, sig_handler() will be executed.
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
When you mouse over and click to add a search term this(these) boolean operator(s) is(are) not implied. (select all that apply)?
Answers: 1
You know the right answer?
Modify the program so that it includes structs for each of the eight shapes that were the subject of...
Questions
question
Mathematics, 14.08.2020 14:01
question
Mathematics, 14.08.2020 14:01
Questions on the website: 13722363