Homework: Inheritance

  < Previous  Next >

For this homework assignment, submit a copy of hwkInheritance.cpp. Note, there are two questions to answer in a multiple line comment at the top of the file. Additionally, add three classes, all in the hwkInheritance.cpp. First, add a base class named Account. Additionally, add a SavingsAccount and a CheckingAccount, each of which inherits from Account. Make sure you put the common private data members and member methods in Account.
For full points, do not make changes to the body of the main() function.
Your copy needs to compile on ranger using the following command-line:
g++  -std=c++0x  hwkInheritance.cpp
Finally, when your code is executed, the output must match what's in hwkInheritance-stdout.txt exactly:
Savings has $222.21 and is accruing interest at 1.2%
Checking has $35.69
      

Submission

Submit your cpp file at https://3110.cs.mtsu.edu/. For further instructions, please see the Miscellaneous page.

Rubric:

Points          Item
----------      --------------------------------------------------------------
_____ /  2      1 (in the comment at the top of the file)
_____ /  2      2 (in the comment at the top of the file)
_____ /  4      Class Account (has all common members)
_____ /  2      Class SavingsAccount (has only members specific to SavingsAccount)
_____ /  2      Class CheckingAccount (has only members specific to CheckingAccount)

_____ / 10      Total