Loading problems/LabFour_ChapterTen.h +3 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ using namespace std; * * @example * labFour_pZero_Person Jim("James"); * Jim.setBirthday("2010-02-30"); // Jim's birthday is on February 30, 2010 * Jim.setBirthday("2010-02-28"); // Jim's birthday is on February 28, 2010 * labFour_pZero_Student Jane("Jane","2020-03-15"); * Jane.setMajor(COMPUTER_ENGINEERING); * labFour_pZero_Instructor Gabi("Gabriella"); Loading Loading @@ -58,9 +58,9 @@ class labFour_pZero_Instructor; * labFour_pOne_Rectangle re1({0, 0}, 1, 2); // area 2, perimeter 6 * labFour_pOne_Square s1({1, 3}, 3); //area 9, perimeter 12 * labFour_pOne_Rhombus rh1({1, 1}, 1, 45); // area sqrt(2)/2, perimeter 4 * labFour_pOne_Circle({0, 0}, 1); // area pi, perimeter 2*pi * labFour_pOne_Circle c1({0, 0}, 1); // area pi, perimeter 2*pi * * vector<labFour_pOne_GeometricThing> things = {q1, re1, s1, rh1}; * vector<labFour_pOne_GeometricThing *> things = {&re1, &s1, &rh1, &c1}; * * labFour_pOne_GeometricThing::sumAreas(things); // returns 2+9+sqrt(2)/2+pi = 14.8487... * labFour_pOne_GeometricThing::sumPerimeters(things); // returns 6+12+4+2*pi = 28.2832... Loading Loading
problems/LabFour_ChapterTen.h +3 −3 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ using namespace std; * * @example * labFour_pZero_Person Jim("James"); * Jim.setBirthday("2010-02-30"); // Jim's birthday is on February 30, 2010 * Jim.setBirthday("2010-02-28"); // Jim's birthday is on February 28, 2010 * labFour_pZero_Student Jane("Jane","2020-03-15"); * Jane.setMajor(COMPUTER_ENGINEERING); * labFour_pZero_Instructor Gabi("Gabriella"); Loading Loading @@ -58,9 +58,9 @@ class labFour_pZero_Instructor; * labFour_pOne_Rectangle re1({0, 0}, 1, 2); // area 2, perimeter 6 * labFour_pOne_Square s1({1, 3}, 3); //area 9, perimeter 12 * labFour_pOne_Rhombus rh1({1, 1}, 1, 45); // area sqrt(2)/2, perimeter 4 * labFour_pOne_Circle({0, 0}, 1); // area pi, perimeter 2*pi * labFour_pOne_Circle c1({0, 0}, 1); // area pi, perimeter 2*pi * * vector<labFour_pOne_GeometricThing> things = {q1, re1, s1, rh1}; * vector<labFour_pOne_GeometricThing *> things = {&re1, &s1, &rh1, &c1}; * * labFour_pOne_GeometricThing::sumAreas(things); // returns 2+9+sqrt(2)/2+pi = 14.8487... * labFour_pOne_GeometricThing::sumPerimeters(things); // returns 6+12+4+2*pi = 28.2832... Loading