Chapter1.3.Fall2009

Chapter1.3.Fall2009 - Java Software Solutions Chapter 1.3...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
1/73 Java Software Solutions Chapter 1.3 Computer Systems (continued)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2/73 External Documentation javadoc The Java SDK (Software Development Kit) includes a means of creating external documentation using a software tool called javadoc . Here is how it works: If you place a second asterisk following the /* at the beginning of a comment, the content of the comment can be used to automatically generate external documentation about your program using a tool called javadoc . Example: /** javadoc will print this comment for use as external documentation. */ (Much more later).
Background image of page 2
3/73 Good Programming Practices Appendix G of our text presents guidelines for good programming practices and includes specific techniques for documenting programs. You can assume the reader is computer literate and familiar with Java. You will be expected to apply the coding guidelines in as presented on my web page and in an appendix in the rear of this textbook as you write your programs.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4/73 Identifiers and Reserved Words Words used when writing programs: identifiers . (algebraic ‘variables?’) Three categories of identifiers : 1. Words that we make up ( Lincoln and args in program 1.1 ) 2. Words that another programmer chose ( String , System , out , println , and main ). Often these are words that were chosen by a programmer for code that became part of a Java library; Now available for use by all Java programmers. 3. Words that are reserved for special purposes in the language ( class , public , static , and void ). The designers of the Java language chose these words.
Background image of page 4
5/73 Examples: The Reserved Words Reserved words are identifiers that have special meaning in a programming language. In the Lincoln program , they are class , public , static , and void . //******************************************************************** // Lincoln.java Author: Lewis/Loftus // // Demonstrates the basic structure of a Java application. //******************************************************************** public class Lincoln { //----------------------------------------------------------------- // Prints a presidential quote. //----------------------------------------------------------------- public static void main (String[] args) { System.out.println ("A quote by Abraham Lincoln:"); System.out.println ("Whatever you are, be a good one."); }// end main() } // end class Lincoln
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6/73 Reserved Words The Java reserved words these words cannot be used for any other purpose , such as naming a class or method . abstract boolean break byte case catch char class const continue default do double else extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws transient true try void volatile while
Background image of page 6
7/73 Rules for Naming Identifiers An identifier (created by us) can be composed
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 27

Chapter1.3.Fall2009 - Java Software Solutions Chapter 1.3...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online