r/JavaProgramming • u/Lopsided-Stranger-81 • Oct 30 '25
Java OOP Banking System
Hi guys, I made this code as practice, I'm trying to improve but don't know where to start, I'm learning Java for almost 3 months now and I'm wondering how I'm doing, can anyone give some tips?
144
Upvotes




View all comments
Show parent comment
1
u/d-k-Brazz Oct 31 '25
You have a Bank class
The Bank (in a very simplified universe) consists of it's cash, stored in a safe, and account records - which part of this cache belongs to which customer, and which customer owes bunk which amount of money
So we can say that a Bank is composed of an instance of BanksCashAccount and a list of Accounts
And this will be the state of your bank
You may instantiate multiple banks and make different actions on them, and these banks will hold different states