My experience: I am a recent graduate looking for work in the software industry. Question: I was in a recent interview with one of the software companies and asked to draw a UML diagram for a banking system that shows 2 accounts, for example. storage and verification, and they have another way of calculating interest.
My solution: I made the Account class an abstract class.
For example: public abstract class Account {......} This class has 2 methods defined in it deposit () and remove (), which is common to any type of account. another method is CalculateInterest (), which is an abstract method.
There are 2 storage and verification classes that extend the account class and implement the Account class. for example: public class Saving extends Account {...}
I added another class to complete UML, like a bank and bank location, but this did not satisfy the interviewer, and he wanted me to implement the whole process as INTERFACES , which I did not understand very well. I tried to extract the same information, but the interviewer did not like it.
Any information that people can share here will help me in understanding the design and further approach to the interview.
I know that they have many design templates that are there, but when he mentioned certain interfaces, I was not sure how to approach this.
design-patterns
user2391361
source share