Jordan just got serious about managing money.
He has:
- A Checking Account
- A Savings Account (earns interest)
- One additional account type of your choice
Your job is to build his virtual banking system using proper Object-Oriented Programming principles.
This is not a “just make it work” assignment. This is a prove you understand OOP assignment.
Design a small banking system that demonstrates:
- Abstraction
- Encapsulation
- Inheritance
- Polymorphism
If you cannot explain where each principle appears in your code, you did not complete the assignment correctly.
You must create:
BankAccount.javaCheckingAccount.javaSavingsAccount.javaYourThirdAccountType.javaMain.java
Create a base account class that represents what all accounts have in common.
All accounts must:
- Have an owner
- Have an account number
- Have a balance
- Support deposits
- Support withdrawals
- Support a monthly update
- Be able to print a summary
Not all accounts behave the same way.
That’s intentional.
-
Allows deposits
-
Allows withdrawals (cannot withdraw more than balance)
-
Monthly update:
- Apply a fee if balance is below a certain amount
You decide reasonable rules.
- Allows deposits
- Allows withdrawals (cannot exceed balance)
- Must accrue interest during monthly update
You decide how interest works.
Choose something different. Examples:
- Credit account
- Investment account
- High-yield savings
- Crypto wallet
- Business account
It must:
- Behave differently than checking and savings
- Have unique rules
- Override behavior where necessary
Be creative — but keep it realistic.
In Main.java:
- Create at least one of each account type.
- Store them together in a single collection (array or ArrayList).
- Perform multiple transactions.
- Run monthly updates on all accounts.
- Print account summaries before and after updates.
Your code must clearly demonstrate:
There should be behavior defined that subclasses must implement.
Fields must not be publicly accessible. Validation must happen inside methods.
Account types must reuse shared behavior.
You must treat different account types as the same base type at some point in your program.
- No static global balances.
- No public fields.
- No copy-pasting code between account classes.
- No giant
if(type == "...")statements in Main to control behavior. - Do not hardcode behavior in Main that belongs in a class.
If your Main file controls account logic, you misunderstood the assignment.
Your output should resemble:
--- BEFORE MONTHLY UPDATE ---
Checking (001) - Balance: $500.00
Savings (002) - Balance: $1000.00
Credit (003) - Balance: $300.00
--- AFTER MONTHLY UPDATE ---
Checking (001) - Balance: $495.00
Savings (002) - Balance: $1020.00
Credit (003) - Balance: $309.00
Your numbers will differ depending on your rules.
Be prepared to:
- Explain where each OOP principle exists in your code. Using comments
- Explain why you made certain methods abstract.
- Explain why fields are private.
- Explain how polymorphism works in your loop.
If you cannot explain it, you don’t fully understand it yet.
Choose one:
- Add a transfer method between accounts
- Add transaction history
- Add overdraft logic
- Add user input with Scanner
- Add unit tests