diff --git a/problems/LabFour_ChapterEleven.h b/problems/LabFour_ChapterEleven.h index 7098140d15b8026e0ba7d7903bddf018f395a038..240d4a94f0f7b44f4cf06e13dca852a76c055f95 100644 --- a/problems/LabFour_ChapterEleven.h +++ b/problems/LabFour_ChapterEleven.h @@ -13,10 +13,13 @@ using namespace std; * Two approaches are different if and only if they differ in the * number of at least one denomination of bills. So $8 = $1+$2+$5 * is the same as $8 = $5+$2+1, but different from $5 + 3*$1. + * + * You may use a helper function so long as you solver the problem in a recursive manner. * * @param dollars The amount of dollars to exchange * @return the number of different ways of generating [dollars] * dollars with the permitted bills + * * * @example labFour_pTwo_exchange(8) = 7 corresponding to the * following ways to exchange $8: diff --git a/problems/LabFour_ChapterTen.h b/problems/LabFour_ChapterTen.h index a76811e0c7b3d85d4135793c9b7f1af6c3d38fa0..03701d3a1feb512aa970e6826de90f933dbc3c3e 100644 --- a/problems/LabFour_ChapterTen.h +++ b/problems/LabFour_ChapterTen.h @@ -16,8 +16,20 @@ using namespace std; * 2. labFour_pZero_Instructor derives from labFour_pZero_Person and has * a salary. * Complete the class definitions and implementations, including constructors, - * destructors, and an external override of stream operator<< and operator>> + * destructors, setters, getters, and an external override of stream operator<< and operator>> * to input and output each object. + * + * When overloading the ostream operators, the output should be formatted such that it includes all fields of the object. + * @example + * labFour_pZero_Person James("James"); + * Jim.setBirthday("2010-02-28"); + * cout << James; // outputs "James, 2010-02-28" + * + * When overloading the instream operators, the input should be formatted such that it includes all fields of the object. + * @example + * labFour_pZero_Person James; + * std::stringstream input("James, 2010-02-28"); + * input >> James; // inputs "James, 2010-02-28" * * @example * labFour_pZero_Person Jim("James"); @@ -39,7 +51,7 @@ class labFour_pZero_Instructor; * * labFour_pOne_Rectangle - a concrete class representing a rectangle * * labFour_pOne_Square - a concrete class representing a square * * labFour_pOne_Rhombus - a concrete class representing a rhombus - * * labFour_pOne_Circle - a concrete class representing a cicle + * * labFour_pOne_Circle - a concrete class representing a circle * FEEL FREE to modify the inheritance structure, as you see fit. * * EACH concrete class must at least have methods with the signatures noted below