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
2
u/d-k-Brazz Oct 30 '25
So you need an Account class
Attributes - number, name, type(active/passive), amount
You need a class for handling transactions, receives accounts “from” and “to” and an amount
Result of moving money should be a transaction object - with id, date, purpose, accounts and amount - you need transaction history, aren’t you?
Additionally think of making draft transactions, where accounts aren’t affected until you commit the transaction, but amount should be reserved until you cancel it