It is just like the Many to Many relationships.
Three entities are given
1.
class Account{
privte String aaccNo;
}
2
Customer{
private Enum custype
private int custId;
List arrayList;
}
3
class RealtionmShip{
private String accNo;
private Enum relationSHiType;
}
One account NUmber : can hvae more than one customers like a joint account, so it seems like Primary account hold and secondary accont holder.(they can be many)
customer : can have more han 1 accounts., CUstomer can have multiple accounts.
Enum customerType can be { BUsinee , Personal}
ENum RelationShip type can be { Authorizer or accountant}
What we need to validate :
ASK by the interviewer
1 Account that is passed should have a customer also in the argument (For each account there is a customer in the request criteria present).
2.If the customer is of customer type business then there should be authorizer relationSHiType
Input criteria will be List account and List Customers .
public void accountDetails(List account,List customer){
}
How to solve this kindly share