Question: Item Goal Task Description Getting a practical experience in Writing simple console application, using nested-if statement, switch-case statement. Write a program which prompts user for

 Item Goal Task Description Getting a practical experience in Writing simple

Item Goal Task Description Getting a practical experience in Writing simple console application, using "nested-if" statement, "switch-case" statement. Write a program which prompts user for the number "X", reads it from the keyboard, and saves it in an int variable called "x". Then prints "One", "Two"...., "Nine" if the int variable "x" is 1,2,..., 9 and "Other" if "x">9, respectively. Use (a) a "nested-if" statement; (b) a "switch-case" statement. The output shall look like (user input-in green): -Enter number : 1 -Enter number x: 12 -One - Other Preparation Execution methodology No special preparation Remind that student should apply his or her knowledge of: how to use "nested-if" statement, "switch-case" statement Execute following steps: - Student should create a new blank Java Project in IDE. - Student should create his or her own Java class and provide all necessary code in a method main() - Student should use System.in and Scanner class to read x value from console Student should use (a) "nested-if" statement or (b) "switch-case" statement Student should use System.out.println(). Ask student to execute the program Evaluation the program must work correctly; Closure Issues discussion, on demand

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!