0% found this document useful (0 votes)
43 views2 pages

Lab 3 - Final: Constructor: Should Call The Bankaccount Constructor

The document outlines the creation of bank account classes with different features. It describes creating a CheckingAccount and SavingsAccount class that inherit from a BankAccount superclass. It also describes creating a FDAccount class that inherits from BankAccount, earns interest based on the deposit term, and only allows one deposit with no withdrawals. The document instructs to use UML diagramming software to design the class relationships.

Uploaded by

Abhinav Pathak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views2 pages

Lab 3 - Final: Constructor: Should Call The Bankaccount Constructor

The document outlines the creation of bank account classes with different features. It describes creating a CheckingAccount and SavingsAccount class that inherit from a BankAccount superclass. It also describes creating a FDAccount class that inherits from BankAccount, earns interest based on the deposit term, and only allows one deposit with no withdrawals. The document instructs to use UML diagramming software to design the class relationships.

Uploaded by

Abhinav Pathak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Lab 3_final

1. Create a hierarchy as follows


Checking account: no interest; small number of free transactions per month,
additional transactions are charged a small fee
Savings account: earns interest that compounds monthly

Constructor: Should call the BankAccount constructor.

Which will accept a double value for balance, name and address.
For SavingsAccount accept rate of interest.

Fields:

SavingsAccount : interestRate
CheckingAccount: transactionCount

Methods:

CheckingAccount
a) Modify the methods to increase transactionCount
b) deductFees: to deduct fees and reset transactionCount.
SavingsAccount
a) methods addInterest

2. Create a class FDAccount as follows

FDAccount is a subclass of BankAccount.


FDAccount:

Variable interest based on term for which invested (6% for upto 12
months, 7% for 12-36 months) and 8% for > 36 months;
No transactions of withdrawal type allowed
Only once deposit/transfer (into the account not out of the account) is
allowed.
Constructor: Should call the BankAccount constructor.

Which will accept a double value for balance, name and address.

Methods should also call the BankAccount methods wherever possible.

3. Ensure that a UML diagram drawing software is installed in your PC and


laptop. (ArgoUML is one possible option).

You might also like