From 62aad0dbd80620767dfb8259e6099e0e3c32c4b9 Mon Sep 17 00:00:00 2001 From: James Knee Date: Mon, 18 Nov 2024 18:44:31 -0500 Subject: [PATCH 1/2] make instructions more clear --- problems/LabFour_ChapterEleven.h | 3 +++ problems/LabFour_ChapterTen.h | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/problems/LabFour_ChapterEleven.h b/problems/LabFour_ChapterEleven.h index 7098140..240d4a9 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 a76811e..9d15bcd 100644 --- a/problems/LabFour_ChapterTen.h +++ b/problems/LabFour_ChapterTen.h @@ -18,6 +18,18 @@ using namespace std; * Complete the class definitions and implementations, including constructors, * destructors, 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 -- GitLab From 9acb61d064c3676be3795edbc9de63f71c4f722e Mon Sep 17 00:00:00 2001 From: James Knee Date: Mon, 18 Nov 2024 18:47:27 -0500 Subject: [PATCH 2/2] added additional comment --- problems/LabFour_ChapterTen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/LabFour_ChapterTen.h b/problems/LabFour_ChapterTen.h index 9d15bcd..03701d3 100644 --- a/problems/LabFour_ChapterTen.h +++ b/problems/LabFour_ChapterTen.h @@ -16,7 +16,7 @@ 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. -- GitLab