What object would you use to draw a simple filled circle on the canvas?
Circle
What keyword do you use to create a new object?
new
What do getWidth() and getHeight() tell you?
The canvas’s width and height
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.
A group of crows is called a what?
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.
What is the first step before adding any object to the canvas?
Create the object and store it in a variable
Where is the point (0, 0) on the canvas?
The top-left corner
Where is the anchor point of a Rectangle?
Top-left corner
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
Which two parameters are needed when creating a Rectangle?
Width and height
Write the 3 steps (in order) to make a Circle appear on the canvas.
Create → Customize → Add
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);
Where is the anchor point of a Circle?
The center of the circle
What programming language's name was inspired by a comedy group?
Python
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");
Replace the ??? with code to add your Rectangle:
let myRect = new Rectangle(100, 50);
myRect.setColor("blue");
??????????
add(myRect);
If a circle’s x-position is 100 and you add 50 to it, what happens?
The circle moves 50 pixels to the right
All objects are surrounded by what invisible shape?
An invisible rectangular frame
What year was the iPhone first released?
2007
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);
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);
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();
What tool can you turn on to see each object’s boundary box and see the anchor point?
Debug mode
What is the only planet in our solar system that rotates clockwise?
Venus