Question: Please help with this below switch / case block java code to insert code so it can not be entered by a user the same

Please help with this below switch / case block java code to insert code so it can not be entered by a user the same ssn nr. mistakenly, when a customer is registered by the user.

Or shall that change be insert in another class? in my case the customer class. Thanks!

case 3: { System.out.print("Enter ssn: "); ssn = sc.nextInt(); List customers = Bank.getCustomers(); for(Customer c:customers) { if(c.getSSN() == ssn) { System.out.print("Enter amount to be added: "); float amount = sc.nextFloat(); c.createAccount(1.2f, amount); } } } break;

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!