Java Program Reads Integer Keyboard Prints Comments Modify Comments Top Program Reflect Pe Q43860215
This Java program reads an integer from a keyboard and prints itout with other comments. Modify the comments at the top of theprogram to reflect your personal information.
Submit Assignment1.java for Assignment #1 usingGradescope->Assignemnt1 on canvas.asu.edu site.
You will see that the program has a problem with our submission.Your program is tested with 4 testcases (4 sets of input and outputfiles). In order to pass all test cases, your program needs toproduce the same output as the ones given below. (Even onecharacter difference causes failure.) This is a part of SoftwareEngineering Testing process (that we will be discussing inclass).
Input 1: 0
Output 1:
This program reads an integer from a keyboard,
and prints it out on the display screen.
Make sure that you get the exact same output as the expectedone.
The read number is 0.
Input 2: -1
Output 2:
This program reads an integer from a keyboard,
and prints it out on the display screen.
Make sure that you get the exact same output as the expectedone.
The read number is -1.
Input 3: 1
Output 3:
This program reads an integer from a keyboard,
and prints it out on the display screen.
Make sure that you get the exact same output as the expectedone.
The read number is 1.
Input 4: -5
This program reads an integer from a keyboard,
and prints it out on the display screen.
Make sure that you get the exact same output as the expectedone.
The read number is -5.
The program should follow this:
// Assignment #: 1
// Arizona State University – CSE205
// Name: Your name
// StudentID: Your Student ID
// Lecture: Your Lecture time
// Description: This class reads an integer from a keyboard andprints it out
// along with other messages.
import java.util.Scanner; // use the Scanner class located inthe “java.util”
directory
public class Assignment1
{
public static void main (String[] args)
{
int number;
Scanner console = new Scanner(System.in);
number = console.nextInt(); // read an integer entered by auser
// display the number with other messages
System.out.print(“This program reads an integer from akeyboard,n”
+ ” and prints it out on the display screen.n”
+ “make sure that you get the exact same output as theexpected
one.n”
+ “The read number is: ” + number + “.n”);
}
}
Expert Answer
Answer to This Java program reads an integer from a keyboard and prints it out with other comments. Modify the comments at the top…
OR