In this exercise, you will create the CAccount class that handles the financial transaction for buying a book. The following table shows the methods and properties you will implement for the CAccount class.
Name | Type | Purpose |
---|---|---|
Price | Property | The price of the book a student wants to purchase. |
Authorize | Method | Looks up a student's account balance. If the balance plus the price of the book is less than $500, this method returns success. |
Debit | Method | Adds the book price to a student's account balance. |
Warning | Event | Sends notification that a student's account balance is greater than $450. |
Memo | Property | A memo to be used when writing the account log. |