NEW
Font size
WorksheetsJava Pictures Quizizz 1
Total questions: 20
Worksheet time: 51mins
Figure f=new Figure(50,200);
f.draw(100,100);
Where does f draw from the starting point?
right 100, up 100
right 100, down 100
left 100, up 100
left 100, down 100
Picture p=-new Picture("TEST", 600,700);
Figure f=new Figure(20,20);
What is the code to make figures display on your picture?
p.plus(f);
p.show(f);
p.display(f);
p.add(f);
f.draw(-100,0);
What kind of line is drawn?
horizontal
veritcal
slope of 1
slope of -1
f.draw(-100,-100);
What kind of line is drawn?
horizontal
vertical
slope of 1
slope of -1
f.draw(100,0);
f.draw(0,100);
f.close();
what shape is made?
line
triangle
rectangle
polygon
f.draw(200,200);
f.setFilled(true);
what is displayed when you add f to your picture?
line
triangle
nothing
f.drawArc(100,200,0,360);
What is the shape of f?
circle
horizontal oval
veritcal oval
half circle
f.drawArc(100,100,90,270);
Which hemisphere is displayed?
northern hemisphere
southern hemisphere
eastern hemisphere
western hemisphere
nothing is displayed
f.drawArc(100,-100,0,180);
Which hemisphere is displayed?
northern hemisphere
southern hemisphere
eastern hemisphere
western hemisphere
nothing is displayed
f.drawArc(100,100,270,90);
Which hemisphere is displayed?
northern hemisphere
southern hemisphere
eastern hemisphere
western hemisphere
nothing is displayed
f.drawArc(-100,100,0,180);
Which hemisphere is displayed?
northern hemisphere
southern hemisphere
eastern hemisphere
western hemisphere
nothing is displayed
Picture p=new Picture();
Figure f=new Figure(100,100);
f.draw(100,100);
f.setColor(Figure.RED);
Figure g=new Figure(100,100);
g.draw(100,100);
g.setColor(Figure.BLUE);
g.setLineWidth(10);
p.add(f);
p.add(g);
What do you see in the picture?
a red line
a blue line
both red and blue lines
nothing
Picture p=new Picture();
Figure f=new Figure(100,100);
f.draw(100,100);
f.draw(100,0);
f.setFilled(true);
f.setColor(Figure.RED);
Figure g=new Figure(100,100);
g.draw(100,100);
g.draw(100,0);
g.close();
g.setLineWidth(25);
g.setColor(Figure.BLUE);
p.add(g);
p.add(f);
What do you see in the picture?
a blue triangle only
a red triangle only
a blue triangle with a red outline
a red triangle with a blue outline
nothing
Color x=new Color(0,255,0);
What color is x?
red
green
blue
black
white
Figure f = new Figure(50,50);
f.setColor(Figure.BLUE);
f.draw(100,0);
f.draw(0,100);
f.draw(-100,0);
f.setLineWidth(3);
f.setColor(Figure.RED);
f.setFilled(true);
What does figure f make?
blue triangle
red triangle
blue square
red square
nothing
Figure f1 = new Figure(320,175);
f1.draw(40,0);
f1.draw(0,40);
f1.draw(-40,0);
f1.close();
f1.draw(0,100);
f1.setLineWidth(10);
Figure f = new Figure(290, 175);
f.draw(-40,0);
f.draw(0,100);
f.draw(40,0);
f.close();
f.setLineWidth(10);
Figure f2 = new Figure(220,175);
f2.draw(-20,0);
f2.draw(0,103);
f2.draw(0,-103);
f2.draw(-20,0);
f2.setLineWidth(10);
Figure f3 = new Figure(150,175);
f3.draw(-40,0);
f3.draw(0,48);
f3.draw(40,0);
f3.draw(0,52);
f3.draw(-40,0);
f3.setLineWidth(10);
What word is spelled out when the figures are added to the picture?
stop
tops
post
pots
Figure f1 = new Figure(100,175);
f1.draw(40,0);
f1.draw(0,40);
f1.draw(-40,0);
f1.close();
f1.draw(0,100);
f1.setLineWidth(10);
Figure f = new Figure(220, 175);
f.draw(-40,0);
f.draw(0,100);
f.draw(40,0);
f.close();
f.setLineWidth(10);
Figure f2 = new Figure(290,175);
f2.draw(-20,0);
f2.draw(0,103);
f2.draw(0,-103);
f2.draw(-20,0);
f2.setLineWidth(10);
Figure f3 = new Figure(360,175);
f3.draw(-40,0);
f3.draw(0,48);
f3.draw(40,0);
f3.draw(0,52);
f3.draw(-40,0);
f3.setLineWidth(10);
What word is spelled out when the figures are added to the picture?
stop
tops
post
pots
class aCompleteProgram{
public static void main(String [] args){
Picture p = new Picture();
Figure f0 = new Figure(150,50);
f0.draw(150,0);
f0.draw(100,125);
f0.draw(0,100);
f0.draw(-100,115);
f0.draw(-150,0);
f0.draw(-100,-115);
f0.draw(0,-100);
f0.close();
f0.setColor(Figure.RED);
f0.setFilled(true);
}
}
What is displayed on the screen when the program is run?
triangle
rectangle
hexagon
octagon
nothing
How many files must you copy, paste, and compile in order for our java pictures to work properly?
1
2
3
4
class interestingTestQuestion{
public static void main(String [] args){
Picture p = new Picture();
int y=1;
int r=50;
for(int x=0;x<1000;x++)
{
if(x<499)
y++;
else
y--;
if(y==0)
{
x=0;
r=(int)(Math.random()*400);
}
Figure f = new Figure(y,r);
f.drawArc(5,5,0,360);
f.setFilled(true);
p.add(f);
p.pause(2);
p.remove(f);
}
}
}
Describe what is happening in this program?
A ball creating a horizontal line across the screen
A ball jumping all over the screen
A ball bouncing back and forth across the screen horizontally
A ball bouncing back and forth across the screen vertically
A ball moving across the screen twice
