Instructions for Adding the Keyboard Class to a Jcreator Project
You should use the Keyboard class (provided by the authors'
of your text) to make the job of reading data from the keyboard
easy. To use this class, follow these brief instructions:
- Create a project folder for this program using JCreator as
described in lab
2. You may choose any name for the project folder, but the java file
and the class name (i.e., the name of the Java class contained in that
file) must be the same.
- Download the java source code for the Keyboard class using this link (right-click on the link), and store it
in the project folder created in step 1.
- In JCreator, select Add Files... from the
Project menu option on the JCreator tool bar.
- In the pop-up window that appears, select or type
Keyboard.java and select Open.
- The Keyboard class is now included in your project. To use the
class in your program you simply need to include the following line of
code at the start of your program:
import cs1.Keyboard;
Remember that capitilization is important. There are examples of
programs that use the Keyboard class in Figures 2.10, 2.11, and 2.12
of your text.