summaryrefslogtreecommitdiff
path: root/week_1/review_program/textbook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'week_1/review_program/textbook.cpp')
-rw-r--r--week_1/review_program/textbook.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/week_1/review_program/textbook.cpp b/week_1/review_program/textbook.cpp
index 09a43bd..3fb99a1 100644
--- a/week_1/review_program/textbook.cpp
+++ b/week_1/review_program/textbook.cpp
@@ -1,7 +1,7 @@
/* textbook.cpp
* Summary: Implementation file for the Textbook class
* Author: Zoltan Szabatin
- * Created: September 26th, 2023
+ * Created: April 2nd, 2024
*/
#include "textbook.h"
@@ -81,6 +81,11 @@ void Textbook::EvaluateNeeds() {
// Determine amount to order based on given percentages
if (this->is_required_ && !this->_is_used) {
+ // This logic seems correct, but doesn't correspond with the sample output.
+ // The flags look to be reversed and not correct in the sample.
+ //
+ // Changing the value from 0.9 to 0.65 yields the same result as the sample
+ // output, but doesn't seem sound.
set_amount_to_order(0.9);
} else if (this->is_required_ && this->_is_used) {
set_amount_to_order(0.65);