1 9 9 8Your prompt should tell the user to enter a four-digit number and you can then assume that the user follows directions. Sample output from your program might look like the following:
Enter a single four-digit integer number: 2003 You entered the number 2003 The digits in that number are: 2 0 0 3 Bye!You will need to use the Keyboard class to make the job of reading the number easy. To use the Keyboard class, follow these instructions when setting up your netbeans project:
import cs1.Keyboard;Remember that capitalization is important. There are simple examples of programs that use the Keyboard class in chapter 2 of your text.
Programming Hint: If a variable named number initially stores the value 1998:
number % 10
number = number / 10;
Note that 10% of your program grade is based on the readability of your program. This includes things like proper indentation, comments, and the naming of variables and methods as described in the style guide for this class. To receive full credit for your program, make sure that you use proper indentation as demonstrated in your text and in class room examples. Also include comments at the top of each program stating your name, the course, and the purpose of the program: For example:
/* ** Name: your name here ** ** Course: CSCI 201 ** ** Purpose: purpose of program here */
The program written for this assignment must be turned in by transferring the java source code file to your ftp directory for this class. Only the source code file (i.e., Digits.java) should be turned in and the file must have exactly that name. You were shown how to transfer files to your class ftp directory in lab 1.