I have an assignment due and was never taught this, I read through the textbook at least 6 times and I can't find anything on it. Can anyone help explain to me where I'm even supposed to begin to figure this out? Anything is greatly appreciated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include<iostream.h>
#include<lvp\string.h>
#include"StringUtility.h"
#include<lvp\CIRCLE.h>
#include<math.h>
int main()
{
CircleClass tire(17);
double height=23.7;
return(0);
}
//-------------------------------------------------------------
double getCylinderVolume(const CircleClass &obj, double height)
/*Determine the volume of the cylinder*/
{
}
You need to write the content of the getCylinderVolume function. I am assuming that the CirlcleClass contains some getRadius function, or even better getArea function. the volume of the cylinder is height *area of the circle or height*M_PI*r*r. So in the getCilinderVolume function all you need to do is to return this value