BFOIT - Introduction to Computer Programming
Background
jLogo Programming
- Commanding a Turtle
- Pseudocode
- Adding New Commands
- Iteration & Animation
- Hierarchical Structure
- Procedure Inputs
- Primitive Operators
- Defining Operators
- Words & Sentences
- User Interface Events
- What If? (Predicates)
- Recursion
- Local Variables
- Global Variables
- Word/Sentence Iteration
- Mastermind Project
- Turtles As Actors
- Arrays
- File Input/Output
Java
- A Java Program
- What's a Class?
- Extending Existing Classes
- Types
- Turtle Graphics
- Control Flow
- User Interface Events
Appendices
Updates
Lastly
Appendix A (Jargon)
- M -
- method
- A method is a Java procedure. Methods provide the actions
in Java programs - they do things. They compute things.
They modify fields. They output words, graphics, sounds,
send messages over the Internet, an infinite number of
different things...
All methods have a type, which means they either output a value of their declared type or, if the type is "void," no output is produced.
There are two parts to a method declaration:
- a header which introduces the method. A header
has the form:
modifiers type methodIdentifier ( parameters ) throws exception
where:- modifiers are keywords like public, private, abstract, and static.
- type is a keyword for a Java primitive type, the keyword void, or a reference-type.
- methodIdentifier is the name you are giving to the method being declared.
- ( parameters ) it the list of parameters that the method is expecting when it is invoked. Although the parenthesis MUST be there, parameter declarations are needed only when the method needs them.
- throws exception is an optional declaration necessary when the method could generate a checked exception.
- a body. The body of a method is either simply a semicolon, which means the body isn't implemented at this point, or it's a block.
- a header which introduces the method. A header
has the form:
Other jargon: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Back to HomePage