diff options
| author | Fuwn <[email protected]> | 2024-04-02 14:02:39 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-04-02 14:02:39 -0700 |
| commit | e275ea505d70d19d54eed057dc6542e359be5e94 (patch) | |
| tree | be3d122bf182d92f1f2f8f5573a14fbe83a7b883 /week_1/review_program/textbook.cpp | |
| parent | docs(review_program): comments (diff) | |
| download | cs260-e275ea505d70d19d54eed057dc6542e359be5e94.tar.xz cs260-e275ea505d70d19d54eed057dc6542e359be5e94.zip | |
docs: update comments
Diffstat (limited to 'week_1/review_program/textbook.cpp')
| -rw-r--r-- | week_1/review_program/textbook.cpp | 7 |
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); |