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. Thanks!
switch (choice) { case 1: { System.out.print("Enter customer unique ssn: "); ssn = sc.nextInt(); System.out.print("Enter customer name: "); sc.nextLine(); String name = sc.nextLine(); Customer customer = new CustomerBuilder().setSsn(ssn).setName(name).createCustomer(); Bank.addCustomer(customer); System.out.println(" Customer added successfully with uniquely ssn: "+customer.getSSN()); } break; Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
