So I’m working on a simple banking system in c++, but I’m still not sure how to exactly implement the structure of the project itself as in the communications between the different classes and stuff. I’m looking for an OOP approach (as abstract as possible).
Problem:
So the idea is constructing a banking system that has different types of users – customers, employees, admins, employers (from external companies), etc.
The customer can make multiple accounts per bank (there can also be multiple banks). The customer can send requests to the bank to be able to handle his accounts – for example opening or closing an account or withdrawing money or redeeming checks or depositing money, etc. These requests should be handled by the bank and the bank should return a response (as in some sort of message) to the customer after his request was handled.
The bank itself should distribute these requests as some sort of “tasks” to the bank’s employees. The employees themselves then handle the given tasks and when they’re done it sends the message to the customer.
The other users can do other stuff, but that doesn’t really matter for the design pattern.
Now my question is which design pattern should I use for this request-task handling situation?
I thought about using a Singleton lets say BankSystem, that just handles these interactions as in customers have a pointer/reference to the object and when they have a request they add it there. Then the BankSystem transfers these requests as tasks to the specified bank and from there the bank can just directly access it’s employees and give them the task. Now going back when it’s finished I don’t know how the BankSystem would be notified and then forward the message to the customer.
Other idea is to have some pointer system (idk what the design pattern would be exactly here) – shared pointers by bank and customers to the bank accounts (holding the balance, bank name and account id) and to somehow notify each other back and forth, but I still don’t know how that would happen.
TL;DR I don’t know what to settle on and how to achieve it exactly – singleton system that handles interactions or shared pointers to bank accounts.