Java Banking Application. Using arrayList to store data.

profilejonnstone
Homework3Text.pdf

MIS 104 Introduction to Object Oriented Programming with Java Homework 3

Homework3: Account Manager In this project, your goal is to develop a program for a bank. Bank will use this program to manage its account system. In this system, Account object has two data member (accountNo, balance) and two behaviors (debit – withdraw money from account, credit – putting money to account.) There will be two account type (DrawingAccount, CreditAccount) Rules for DrawingAccount

• Balance must be greater than or equal to zero.

• If Balance < Request Amount then You cannot withdraw money. (Generate Error) Rules for CreditAccount

• Balance must be smaller than or equal to zero.

Program Flow: User can open as many accounts as she/he wants. Therefore, you should store accounts with arraylist structure. You should create a number for account while opening account and your program notify this account number to user. When user wants to withdraw money from an account, program must get account no from user, then amount. Then program do withdraw operation for given account and amount. (if conditions are suitable. Check rules) When user wants to credit money to an account, program must get account no from user, then amount. Then program do credit operation for given account and amount. (if conditions are suitable. Check rules) User can close her/his accounts. For this operation, your program gets account number from user and do close operation. An account can be closed if balance is zero. Otherwise, you should generate error (Exception) to User.

Expectations

• At least one abstract method, class and usage.

• At least one interface and its usage.

• extends keyword usage

• implement keyword usage

• upcasting (You should explain in the code upcasting with comments.)

• You should develop at least 5 class in your program.

MIS 104 Introduction to Object Oriented Programming with Java Homework 3

Directions Construct the Java program according to standards Project Name = MIS104AProjects Package Name = homework3 Main Class Name = BankAccountManager + Your Student Number Write a comment to your program that describes the flow and structure of your program. Comment must be more than 50 words. Create a base Account class. Then create a child class for each account type that extends the base Account class. You should keep account information in arraylist. (May you may need to review arraylist in java)

Grading 5% Naming and Comments. (Write your code according to Java Naming Convetion) 10% abstract keyword usage 10% interface keyword usage 10% extends keyword usage 10% implements keyword usage 10% upcasting – you should explain the upcasting in your code. 20% At least 5 class 25% for output validation.