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 Loan-define 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 registerApplication(String 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 5.If it is greater than 5 return "Application list full".If the list doesn't have 5 applications, then add the new application to the list and return "New application registered"-String cancelApplication(String 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!