diff options
Diffstat (limited to 'week_1/review_program/textbook.h')
| -rw-r--r-- | week_1/review_program/textbook.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/week_1/review_program/textbook.h b/week_1/review_program/textbook.h index 8bb05d3..e546c14 100644 --- a/week_1/review_program/textbook.h +++ b/week_1/review_program/textbook.h @@ -13,17 +13,17 @@ namespace wk1_reviewProgram_zSzabatin { class Textbook { private: // Input values - uint64_t code_; - double single_copy_price_; - uint64_t number_on_hand_; - uint64_t prospective_enrollment_; - bool is_required_; - bool _is_used; + uint64_t code_; // Book code + double single_copy_price_; // Price of a single copy + uint64_t number_on_hand_; // Number of copies on hand + uint64_t prospective_enrollment_; // Number of students expected to enroll + bool is_required_; // Is the book required? + bool _is_used; // Is the book used? // Fix 6 byte misalignment const char PADDING[6] = {0}; // Evaluated values - uint64_t amount_to_order_ = {0}; - double total_cost_ = {0}; + uint64_t amount_to_order_ = {0}; // Number of copies to order + double total_cost_ = {0}; // Total cost of the order public: // Constructors @@ -67,6 +67,8 @@ public: void SetIsUsed(bool); // Procedures + /// Precondition: Values have been set: code_, single_copy_price_, + /// number_on_hand_, prospective_enrollment_, is_required_, _is_used void EvaluateNeeds(); // Printers |