Professional Documents
Culture Documents
Programming: What Is A Program?
Programming: What Is A Program?
What is a program?
◦ A set of instructions
◦ Understood by a computer
What does a program look like?
extends
◦ Builds upon an already written class
import
◦ Allows the use of instructions written elsewhere
Parts of a Class
Body
◦ Enclosed in the curly braces found on the line “public class…”
Methods:
public void onMousePress ( Location point ) {
new Text( "I’m touched", 40, 50, canvas );
}
The Life of a Program
Write the Program
onMouseRelease:
◦ Runs code when the buttons released