Question: Need help using Java code. 1.17 Variables, input, and casting (Java) (1) Prompt the user to input an integer, a double, a character, and a

Need help using Java code.

Need help using Java code. 1.17 Variables, input, and casting (Java) (1)Prompt the user to input an integer, a double, a character, and

1.17 Variables, input, and casting (Java) (1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space. (Submit for 2 points). Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy (2) Extend to also output in reverse. (Submit for 1 point, so 3 points total). Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 (3) Extend to cast the double to an integer, and output that integer. (Submit for 2 points, so 5 points total). Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 3.77 cast to an integer is 3 283902.2304318.qx3zqy7 LAB ACTIVITY 1.17.1: Variables, input, and casting (Java) 0/5 Basiclnput.java Load default template... 1 import java.util.Scanner; 2 3 public class Basic Input { 4 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); int user Int = 0; 7 double userDouble = 0.0; 8 // FIXME Define char and string variables similarly 5 6 9 System.out.println("Enter integer: "); user Int = scnr.nextInt(); // FIXME (1): Finish reading other items into variables, then output the four values on a single line separat 10 11 12 13 14 15 16 17 18 1 // FIXME (2): Output the four values in reverse // FIXME (3): Cast the double to an integer, and output that integer

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!