I am having trouble understanding classes, I'm new at this and have not had any problems with c++ until now. This is what I have so far. I was supplied the driver and cannot make any changes to it. Any help would be appreciated greatly. Thanks.
#include <iostream>
using namespace std;
const pi = 3.1415926;//global constant Pi
/*
A cylindrical can.
*/
class SodaCan
{
private:
int height, radius;
public:
void get_volume (double);
void get_surface_area (double);
};
void SodaCan::get_volume (int height, int radius)//can volume = piR^2H
{
volume=pi* ?????
}
void SodaCan::get_surface_area (int height, int radius);//can surface area = 2piRH+2piR^2
{
surface=2*pi ??????
}
// a driver:
int main()
{
SodaCan can(10, 5); //height is 10, and radius is 5
cout << can.get_volume() << "\n";
cout << can.get_surface_area() << "\n";
return 0;
}