CM UNIT 2 Flashcards
arguments for draw rect
start x, start y, width, height
arguments for draw line
start x, start y, end x, end y
arguments for fill react
start x, start y, width, height
arguments for draw oval
start x, start y, width, height
arguments for fill oval
start x, start y, width, height
Turtle movement
turnLeft
turnRight
Forward
Back
what method sets the turtle pen color
Set Color
what does SetPenDown do
SetPenDown(true)
will draw line as turtle moves.
SetPenDown(false)
will not draw a line as turtle moves.
what does accessor methods do?
returns value of object field
what does accessor method look like
public int getx()
starts with get
What does modifier method do?
Changes value of object field
What does modifier method look like
public void setx(int x)
what are access modifiers
specify which class can see field or method
what does public keyword do
Any class can see or access method
what does private keyword do
Only class that field is defined can see or access the method.
what does static keyword mean
The field or method belongs to the class
what does it mean to buffer drawing commands?
To draw into memory rather than directly into screen
What are abstract methods
methods with no code only a header
what are abstract classes
A class with at least 1 abstract method
What is the timer class used for
Generating an event every set time interval
What is listener
A listener is an object that handles an event through the action performed method