Question: 2. Write a Java program that uses switch statement to offer the user 3 choices to choose from them: (Total: 6 Marks) - Case

 2. Write a Java program that uses switch statement to offer the user 3 choices to choose from them: (Total: 6  

2. Write a Java program that uses switch statement to offer the user 3 choices to choose from them: (Total: 6 Marks) - Case 1, the program will ask the user to enter 2 numbers. Then, it will find the sum of them using an external method. - Case 2, the program will ask the user to enter a number. Then, it will print whether the number is Even or Odd. Case 3, the program will ask the user to enter a number. Then, it will check: o If the number is greater than 30 and less than 60, print "Try bigger number" o If the number you entered is greater than or equal to 60 and less than 100, print "The number you entered is accepted" o If the number is less than or equal to 30 or greater than or equal to 100, print "The number you entered is out of range"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The task outlined in the image is to write a Java program that uses a switch statement to offer the user three choices and to perform different action... View full answer

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 Programming Questions!