Program Description
In this project, you will create a simulation of a computer system that maintains a small independent bank. Let’s get started!
Create a class called BranchBanking that keeps track of 4 clients using an arrayList.
Create a Client class that will contain the information for each client. Each client can have two different types of accounts:
Personal and Business
. For simplicity sake, force every client to have both types of accounts. Each bank account should keep track of the client’s first name, last name, username, password, and account balances
.
CorporateOffice
that contains a set of branchBanking objects using an arrayList. The corporateOffice class will be in charge of managing and overseeing the operations at all the branch locations.
Create a method for CorporateOffice called
'checkProfit()'
that will check if there are enough deposited funds in the client’s accounts to turn a profit. The 'checkProfit()'
method will return True if there has been a profit made and False if there hasn't been a profit. You must also create a method in the BranchBanking class called 'getMoney()'
that will return the total sum of the monies(Personal & Business accounts) in each branch location's client accounts. The method 'getMoney()'
must be used by the CorporateOffice's 'checkProfit()'
method.
To check the profit, let’s assume that the bank earns a 5% annual return on deposited funds through investing in an index fund. Also, assume that each branch requires $7,000 a month to pay for all it’s recurring expenses including payroll. The method "checkProfit()" will return True if the amount earned in all accounts are greater than the total recurring expenses and False otherwise.
This information should not be chosen by the user.
Since we are just in the testing phase, we will not need to create the system that creates accounts at the branch banking level.
Let’s assume that the corporate bigwigs assume that personal accounts makeup 40% of the total funds managed by the bank. This would mean that business accounts are assumed to makeup 60% of the total funds. Create a method called
"profitPer()"
that will return True if the total money earned from all personal accounts is greater than 40% of the total recurring expenses and False otherwise. Also, create a method called "profitBus()"
that will do the same for all the business accounts.
The program should begin by asking for the client's username and password. Then the client’s credentials must be validated to begin a set of transactions.
Begin the program by asking the user to enter their credentials.
Once the client is in the system, print the following menu:
- Make a deposit into Personal bank account.
- Make a withdrawal from your Personal bank account.
- View your Personal bank account balance.
- Make a deposit into Business bank account.
- Make a withdrawal from your Business bank account.
- View your Business bank account balance.
- Exit the system.
If the user enters '-1' for both the username and password at the first menu, they will enter the
corporate system
and will be given the following menu.
- Print out all client information.
- Print out all business account information.
- Print out all personal account information.
- Print out whether a monthly profit was earned.
- Print out whether a monthly profit was earned through Personal Banking.
- Print out whether a monthly profit was earned through Business Banking.
- Exit.
In addition to the Big-3(instance vars, constructors, & toString) and getters & setters, be sure that your program has the following methods defined:
Corporate Class
:
public Client getClient(username, password);
public String getPersonalInfo();
public String getBusinessInfo();
public boolean checkProfit();
public boolean checkPersonalProfit();
public boolean checkBusinessProfit();
Business Class
: public Client getClient(username, password);
public String getPersonalInfo();
public String getBusinessInfo();
public double getAllMonies();
public double getPersonalMonies();
public double getBusinessMonies();
A rubric can be found here.
Sample Output
** Welcome to the “Bank”! ** Enter your Username: -1 Enter your Password: -1 ** Regional Manager Account ** 1. Print out all client information. 2. Print out all business account information. 3. Print out all personal account information. 4. Print out whether a monthly profit was earned. 5. Print out whether a monthly profit was earned through Personal Banking. 6. Print out whether a monthly profit was earned through Business Banking. Choose an option: a Error! Enter a number from 1-6. Choose an option again: 1 Michael Jackson (Personal Balance): $0.00 Michael Jackson (Business Balance): $0.00 Bob Dylan (Personal Balance): $10,000.00 Bob Dylan (Business Balance): $3,000.00 Justin Bieber (Personal Balance): $9,000,000.00 Justin Bieber (Business Balance): $300,000.00 Miley Cyrus (Personal Balance): $177,000.00 Miley Cyrus (Business Balance): $350,000.00 ** Regional Manager Account ** 1. Print out all client information. 2. Print out all business account information. 3. Print out all personal account information. 4. Print out whether a monthly profit was earned. 5. Print out whether a monthly profit was earned through Personal Banking. 6. Print out whether a monthly profit was earned through Business Banking. Choose an option: 2 Michael Jackson (Business Balance): $0.00 Bob Dylan (Business Balance): $3,000.00 Justin Bieber (Business Balance): $300,000.00 Miley Cyrus (Business Balance): $350,000.00 ** Regional Manager Account ** 1. Print out all client information. 2. Print out all business account information. 3. Print out all personal account information. 4. Print out whether a monthly profit was earned. 5. Print out whether a monthly profit was earned through Personal Banking. 6. Print out whether a monthly profit was earned through Business Banking. Choose an option: 3 Michael Jackson (Personal Balance): $0.00 Bob Dylan (Personal Balance): $10,000.00 Justin Bieber (Personal Balance): $9,000,000.00 Miley Cyrus (Personal Balance): $177,000.00 ** Regional Manager Account ** 1. Print out all client information. 2. Print out all business account information. 3. Print out all personal account information. 4. Print out whether a monthly profit was earned. 5. Print out whether a monthly profit was earned through Personal Banking. 6. Print out whether a monthly profit was earned through Business Banking. Choose an option: 4 A monthly profit was earned: True. ** Regional Manager Account ** 1. Print out all client information. 2. Print out all business account information. 3. Print out all personal account information. 4. Print out whether a monthly profit was earned. 5. Print out whether a monthly profit was earned through Personal Banking. 6. Print out whether a monthly profit was earned through Business Banking. Choose an option: 5 A monthly profit was earned through “Personal Banking”: False. ** Regional Manager Account ** 1. Print out all client information. 2. Print out all business account information. 3. Print out all personal account information. 4. Print out whether a monthly profit was earned. 5. Print out whether a monthly profit was earned through Personal Banking. 6. Print out whether a monthly profit was earned through Business Banking. Choose an option: 6 A monthly profit was earned through “Business Banking”: True. ** Regional Manager Account ** 1. Print out all client information. 2. Print out all business account information. 3. Print out all personal account information. 4. Print out whether a monthly profit was earned. 5. Print out whether a monthly profit was earned through Personal Banking. 6. Print out whether a monthly profit was earned through Business Banking. Choose an option: -1 ** Thank You! **