Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use c++ programming 1. The figure below describes a main program that invokes a function computeAveVolume () to compute : the number of shapes in

use c++ programming

image text in transcribed

image text in transcribed

1. The figure below describes a main program that invokes a function computeAveVolume () to compute : the number of shapes in a vector the total and average volume of all shapes stored in the vector #include #include #include using namespace std; typedef struct Shape 3D ! string name, color, double volume; } Shape 3DType: void computeAveVolume (vector shape 3DVec, intoutl, double out2, double out 3); int main() 1 Shape 3DType shapeArray [4]; shapeArray [0] - ["Sphere", "Green", shapeArray [1] = {"Cube", "Yellow", shapeArray [2] - "Tetrahedron", "Red", shapeArray [3] "Cylinder" "Blue", 100.11); 200.22 300.33) 400.44) vector shapeRecsVector (shapeArray, shapeArray + sizeof IshapeArray) / sizeof (Shape 3DType)); int noof Shapes - -1; double tot Volume - 0; double aveVolume-01 computeAveVolume (shapeRecs Vector, inoofshapes, stotVolume, saveVolume); cout

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_2

Step: 3

blur-text-image_3

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

consider how quantitative data can contribute to your research;

Answered: 1 week ago

Question

internationalization of business?

Answered: 1 week ago