Java Student Project         

 

Initials
Ability Level: Beginner  
Estimated Time: 20 minutes
Objectives:
  • To learn how to manipulate the output. 
  • To learn about using special characters.
Materials & Resources:
  • Java Software
  • Textbook
Overview: Write a program that outputs your initials on the screen. Compose each initial with six lines of the initials themselves, as in the following example:

RRRRR               K      K
R         R               K   K
RRRRR               KK
RR                        K K
R   R                     K    K
R      R                  K       K

Instructions:
  1. Create an introductory function to explain your program to the user.

  2. Write a Java program that outputs your initials to the screen.
    
Hints: Some important points to keep in mind in doing this project:
  1. The literal string "Program Initials" appears within parentheses because the string is an argument to a method. 
  2. Method names usually are referenced by their following parentheses, as in println(), so you can distinguish method names from variable names.
  3. The print() method is very similar to the println() method. With println(), after the message prints, the insertion point appears on the following line. With print(), the insertion point does not advance to a new line; it remains on the same line as the output.
  4. The Java programming language is case sensitive -- the class names System is a completely different class from one named system, SYSTEM, or even sYsTeM.
  5. The Java programming language is based on Unicode, which is an international system of character representation. The term letter indicates English-language letters, as well as characters from Arabic, Greek, and other alphabets.
  6. Always follow established conventions for the Java programming language so the programs will be easy for other programmers to interpret and follow.
  7. Use white-space to organize your program code and make it easier to read. White-space is any combination of spaces, tabs, and carriage returns (blank lines). You cannot use white-space within any identifier or keyword. 
  8. Java applets do not require a method named main().
  9. When referring to the String class in the main() method header, the square brackets indicate an array of String objects.
  10. The text editor options can be changed, including syntax color choices, by selecting options from the tools menu, then selecting a category under the text editor node
  11. When using Visual J++, to display the members for a class or object manually, place your insertion point anywhere in the class or object name and slect List Members from the Edit menu or press Ctrl + J. To display parameter information manually, place your insertion point anywhere in a statement and select Parameter Info from the Edit menu or press Ctrl + Shift + I.
  12. You can open a new project by clicking the New Project button on the Standard toolbar or by pressing Ctrl + N.
  13. Visual J++ automatically places eacy curly bracket on its own line. Any curly brackets that you enter manually should also be placed on their own lines. Although placing curly brackets on their own line is not required in Java programming, it is good practice because it makes your code easier to read.
  14. Add comments as the first three lines of every program. The comments should contain the program name, your name, and the date. 
  15. The forward slash ( / ) and the backslash ( \ ) characters are two distinct characters. You cannot use them interchangeably.
  16. The name of the Properties command changes to reflect the name of the current project. For example, your project name is Hello. If you opened a project named My Project, the the Properties command on the Project menu would read My Project Properties.
  17. In case you still need help, look in this lecture: Starting Java