Creating a simple Automated Teller Machine(ATM) using OOP in Java. The console version was easy. I'm stuck on the event-driven GUI version. I've created all the views using SceneBuilder. Each scene has a "controller.java" file to manage movement throughout the program. The navigation piece works fine. I'm writing because I don't know how to implement my "Account" class so that I can manipulate the same "Account" object in each of the four scenes.
The main method is in a file called Atm.java. The AtmController.java draws the scene with four buttons for "Create New Account","Deposit","Withdrawal",and "Balance". Ideally, I would create a new account and then make deposits, etc. It only needs to handle one account, no arrays or lists. I've created an "Account" class with all the constructors, getters and setters. They all work locally. However, the object doesn't survive the scene change. I'm out of scope.
I'm hoping there is a simple answer for those born and raised on event-driven OOP. I'm not one of those people. I'll post some code if necessary. However, most of it is boilerplate. It just moves me from window to window. And the getters and setters are exactly what you'd expect. The "Account" class has two private attributes: Name and Balance. Name is a String. Balance is a double. Let me know if you need more info.