Question: programming lab 2 URGENT!! i need the answer for example 3 urgently please. Exercise##2: (DO IT BY HAND) What is the output of the following

programming lab 2 URGENT!!
i need the answer for example 3 urgently please.
programming lab 2 URGENT!! i need the answer for example 3 urgently

Exercise\#\#2: (DO IT BY HAND) What is the output of the following program for: a) option =3 b) option =1, amount =700 c) option =2, amount =850 package lab2; import java.util.Scanner; public class Q3 \{ public static void main(String[] args) \{ Scanner console = new Scanner(System.in); int option; double amount, balance =23500.0; System.out. println("1: Withdrawalln2: Depositln3: Check balance "); System.out.print("Please enter you selection (1,2, or 3 ): "); option-console.nextint); if ( option =1 ) System.out.println( "Enter amount to withdraw: "); amount=console.nextDouble); balance - = amount; System.out.println( "Your balance is: " + balance); ) else if (option =2 ) \{ System.out.println( "Enter amount to deposit: "); amount=console.nextDouble0; balance + = amount; System.out.println( "Your balance is: " + balance); ) else if (option = 3) System.out.println( "Your balance is: " + balance); else 1 System.out.println("Remove card "); i Exercise\#3: Modify the code in exercise\#7 to use the switch statement

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!