Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Help with insert code in below Java switch/case so the amount can't be 0, must be over 0 (shall I use another if statement?) Please
Help with insert code in below Java switch/case so the amount can't be 0, must be over 0 (shall I use another if statement?) Please answer back with the changes inserted in the below code, Thanks! case 3 -> { System.out.print("Enter customers ssn: "); ssn = sc.nextInt(); Listcustomers = Bank.getCustomers(); for (Customer c : customers) { if (c.getSSN() == ssn) { System.out.print("Enter the amount: "); float amount = sc.nextFloat(); c.createAccount(1.2f, amount); System.out.println(" Account added for customer with: " + ssn); } } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started