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.