// Test classe Sfera con Array di puntatori a sfere #include using std::cout; using std::endl; #include "Sfera.h" int main () { Sfera *sPtr[4]; Sfera s0(1., 2., 3., 4.); Sfera s1(11., 12., 13., 14.); Sfera s2(21., 22., 23., 24.); Sfera s3(31., 32., 33., 34.); sPtr[0] = &s0; sPtr[1] = &s1; sPtr[2] = &s2; sPtr[3] = &s3; for (int i = 0; i < 4; i++) { cout << sPtr[i]->getName() << ": "; sPtr[i]->print(); cout << " Superficie: " << sPtr[i]->getArea() << "; Volume: " << sPtr[i]->getVolume() << endl; } return 0; }