Objects Methods
The 3 Steps
Measuring & Positioning
Anchors and Frames
Trivia Time!
100

What object would you use to draw a simple filled circle on the canvas?

Circle

100

What keyword do you use to create a new object?

new

100

What do getWidth() and getHeight() tell you?

The canvas’s width and height

100

What is an object’s “anchor point”, and what method do we use to change it?

The point used to place an object when adding it to a canvas.  We change it using the setPosition() method.  

100

A group of crows is called a what?

A murder of crows.
200

What is the parameter of a WebImage object?  Does it need quotes or not? 

A string containing the URL of the image.  It must have quotes. 

200

What is the first step before adding any object to the canvas?  

Create the object and store it in a variable

200

Where is the point (0, 0) on the canvas?

The top-left corner

200

Where is the anchor point of a Rectangle?

Top-left corner

200

DAILY DOUBLE!  Must answer both:

What is the term for a word or phrase that reads the same backwards and forwards?

What is the term for a word that phonetically imitates the sound it describes (like "buzz" or "hiss")?

Palindrome

Onomatopoeia

300

Which two parameters are needed when creating a Rectangle?

Width and height


300

Write the 3 steps (in order) to make a Circle appear on the canvas.

Create → Customize → Add

300

Write the code to place an Circle object named obj in the center of the canvas using getWidth() and getHeight().

obj.setPosition(getWidth()/2, getHeight()/2);

300

Where is the anchor point of a Circle?

The center of the circle

300

What programming language's name was inspired by a comedy group? 

Python

400

If you created a text object named txt, how do you change the text inside txt to "apple"?

Write the line of code to make this change! 

txt.setText("apple");

400

Replace the ??? with code to add your Rectangle: 

let myRect = new Rectangle(100, 50);
myRect.setColor("blue");
??????????

add(myRect);

400

If a circle’s x-position is 100 and you add 50 to it, what happens?

The circle moves 50 pixels to the right

400

All objects are surrounded by what invisible shape?

An invisible rectangular frame

400

What year was the iPhone first released?

2007

500

Assume you have created a Line object named ln. Write the lines of code that would change ln’s start position to (x1, y1), and end position to (x2, y2).

ln.setPosition(x1, y1); 

and 

ln.setEndpoint(x2, y2);

500

Write code to create and add to the canvas: 

a red Circle object named circ of size 30, with a center at (50, 100).

let circ = new Circle(30);
circ.setColor("red");
circ.setPosition(50, 100);
add(circ);

500

If I correctly created and added a Rectangle object named rect, what code would allow me to get the width of rect and save it to variable rectW?

let rectW = rect.getWidth();

500

What tool can you turn on to see each object’s boundary box and see the anchor point?

Debug mode

500

What is the only planet in our solar system that rotates clockwise? 

Venus

M
e
n
u