Program To Create Bank Account In Java
Ravi Desigan wrote. Is a M:M scenario. So I am going to have the Customer Object store the Bank references in an arraylist and have the Bank store the customers it has in an arrayList. I do not like the Customer object having internal private instance variables for multiple accounts.That suggests you are not designing your application.
Java Program Bank Account Transaction
You are trying to code it before you have finished the design.1. Is my above design correct/good/feasible for large scale application?No2. Does the Customer object strictly need to be aware of its accounts, which I am trying to avoid in the above scenario?That sounds like, “Is it all right for the customers not to know how many accounts they have and how much money is in each?”3. Are there better, alternative design solutions?Yes.4. Is there provision for declaring abstract classes, interfaces, etc in the above design?.At this stage that is a meaningless question.
Finish the design and it should become obvious whether you can use interfaces and abstract classes. Ravi Desigan wrote:1.
Is my above design correct/good/feasible for large scale application?3. Are there better, alternative design solutions?I agree with Campbell, no, this is not a good design for a large scale application. A large-scale application would involve layering and distribution of components on multiple hosts with capabilities to accept transactions from multiple sources and thousands of transactions occurring concurrently. Your ideas are designed to run as one process with a single user. Plus the classes you planned out and the relationships and interactions are trying too hard to model the real world.
That's a trap and it never ends well.There are alternative design solutions but it depends on how much time you have to devote to the work. I suggest you curb your enthusiasm and either pare down the scope of your project and requirements or look for something else that's more manageable by a single person. Large-scale applications aren't built overnight or in a month even.
Bank Account With Password Java Program
In fact, real-world large-scale banking applications could have thousands of people working them over several years and are so large and complex that it's impossible for any single person to know everything about the system. The objects include -BANKCUSTOMERACCOUNTSince the Bank has many customers and each customer can have accounts in several banks, there is a M:M scenario.I think you are over thinking what it means to be a 'customer'. I am a customer of bank 'A' and also bank 'B' but as far as bank 'A' is concerned I am customer '12345' and at bank 'B' I'm customer '5551212'. So 'customer' in your model should be from the bank's perspective thus eliminating the M:M issue.If you wanted to take it to the next extreme you'd need something like a Person who has a list of establishments that they have accounts at. The key to this list would be an establishment ID and that establishment's customer ID. This would still not be an M:M problem. Carey Brown wrote:The objects include -BANKCUSTOMERACCOUNTSince the Bank has many customers and each customer can have accounts in several banks, there is a M:M scenario.I think you are over thinking what it means to be a 'customer'.
The series revolves around the life of Kimberly Ann Possible, a junior adventurer who deals with both super-villains trying to take over the world and her own school life without actually living a double life. Her lifetime friend Ron Stoppable and Ron's pet naked mole rat, Rufus, act as sidekicks. The show is action-oriented, but also has a light-hearted atmosphere and often lampoons the conventions and clich?s of the secret-agent and action genres. They are backed up by Wade, a ten-year-old genius who gives Kim her equipment and missions and never seems to leave his room, though he does on a few occasions in the last season. Kim Possible is an Emmy Award-winning American animated television series about a teenage crime fighter who has the task of dealing with worldwide, family, and school issues every day.
I am a customer of bank 'A' and also bank 'B' but as far as bank 'A' is concerned I am customer '12345' and at bank 'B' I'm customer '5551212'. So 'customer' in your model should be from the bank's perspective thus eliminating the M:M issue.If you wanted to take it to the next extreme you'd need something like a Person who has a list of establishments that they have accounts at. The key to this list would be an establishment ID and that establishment's customer ID.
This would still not be an M:M problem.Ha. I enjoyed this answer! Made me rethink my OP very much! Certainly, you are right! If I think the more comprehensive scenario would be to include all Banks that someone is a customer of, then surely, as you say, such as situation could be extended to every institution that he/she is a member of! Such as schools/colleges/hospitals and what not!Therefore, when I code this bank application, I will limit my choice to just 1 bank. Thank you for the insight.