Question: Class Loan - define the object of HashMap > with variable name app listThe String defines the name of the person and the Arraylist will
Class Loandefine the object of HashMap with variable name app listThe String defines the name of the person and the Arraylist will have list of applicationsImplement the below methods for this class:String registerApplicationString name. Application ap:Write a code to add a new application in the list with the name as key after the following validations:If there is no key with the given name then add a new key and add the application into this list and return "New user".If the name is already present check if the number of applications is not greater than If it is greater than return "Application list full".If the list doesn't have applications, then add the new application to the list and return "New application registered"String cancelApplicationString name. Application ap:Write a code to check if the given person exists or not.If the person is not present then return No user found".If the user exists then check if the application is present or not.If the application is not present then return No application found".If the application is present and it is the only application present then remove the name of the person also and return Cancelled successfully".
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
