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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:10, golderhadashaowtatz
Which are not examples of chronic or persistent stress? moving
Answers: 1
image
Computers and Technology, 22.06.2019 17:00, Janznznz1121
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best suited for this?
Answers: 2
image
Computers and Technology, 22.06.2019 18:00, alexj29227405
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
image
Computers and Technology, 23.06.2019 09:00, 19youngr
Which company provides a crowdsourcing platform for corporate research and development? a: mtruk b: wiki answers c: mediawiki d: innocentive
Answers: 2
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 in other subjects:

Konu
Mathematics, 31.03.2021 21:40