Banking System: Account, SavingsAccount, CurrentAccount, Bank Class

Verified

Added on  2019/09/16

|1
|385
|353
Homework Assignment
AI Summary
This assignment requires the development of a Java-based banking system. The core of the assignment involves creating classes: Account, SavingsAccount, CurrentAccount, and Bank. The Account class serves as a base, with SavingsAccount and CurrentAccount extending it. SavingsAccount includes interest calculation, while CurrentAccount manages overdraft limits. A Bank class manages a collection of accounts, offering methods to open, close, and update them, including interest application for savings accounts and overdraft notifications. Students are expected to implement these classes, integrate them, and test their functionality, including the creation of test accounts and methods for depositing, withdrawing, and managing account balances. The assignment also includes a lecture component requiring documentation of the code and its output.
Document Page
AMA INTERNATIONAL UNIVERSITY – BAHRAIN
Salmabad, Kingdom of Bahrain
COLLEGE OF COMPUTER STUDIES
___1st Tri, ___2nd Tri, __ 3rd Tri, ___ Summer, SY 2016-2017
CSCI431-Computer Programming - II (Term Project)
Instructions:
FOR LAB :You will be asked to develop a series of programs based on the concepts learned in
this course. You will also be asked to execute these programs followed by a brief question answer
session.
(20 marks) Attached rubrics.
FOR LECTURE :Student will also prepare a documentation listing of all the programs along with
their output and description of the programs in your own way.
(20 marks ) Attached rubrics.
1. Banking System
Look at the Account class Account.java and write a main method in a different class to briefly
experiment with some instances of the Account class.
Using the Account class as a base class, write two derived classes
called SavingsAccount and CurrentAccount. A SavingsAccount object, in addition to the
attributes of an Account object, should have an interest variable and a method which adds
interest to the account. A CurrentAccount object, in addition to the attributes of
an Account object, should have an overdraft limit variable. Ensure that you have overridden
methods of the Account class as necessary in both derived classes.
Now create a Bank class, an object of which contains an array of Account objects.
Accounts in the array could be instances of the Account class, the SavingsAccount class,
or the CurrentAccountclass. Create some test accounts (some of each type).
Write an update method in the bank class. It iterates through each account, updating it in
the following ways: Savings accounts get interest added (via the method you already
wrote); CurrentAccounts get a letter sent if they are in overdraft.
The Bank class requires methods for opening and closing accounts, and for paying a
dividend into each account.
Hints:
Note that the balance of an account may only be modified through
the deposit(double) and withdraw(double) methods.
The Account class should not need to be modified at all.
Be sure to test what you have done after each step.
1
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
[object Object]