{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Unit 1 Quiz - Unit 1 Quiz 1 What does a bug do when it is...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Unit 1 Quiz 1 What does a bug do when it is facing a wall? Choose one answer. a. It stays where it is and drops a flower b. It turns 90 degrees to the left c. It turns 90 degrees to the right d. It turns 45 degrees to the left e. it turns 45 degrees to the right 2 Assume a bug is facing North. What happens when you invoke setDirection from the drop-down menu for a bug with negative 45? Choose one answer. a. It causes an IllegalArgumentException b. The state of the bug does not change c. The bug turns 45 degrees to the right d. The bug turns 45 degrees to the left e. The bug changes color to green 3 Which of the following is not an object that appears when the GridWorld simulation is run with BugRunner? Choose one answer. a. A bug b. A grid c. An actor d. A flower e. A rock 4 Which of the following is a behavior of a flower? a. It moves behind the bug that dropped it b. It changes its color c. It turns 45 degrees to the right d. It turns 90 degrees to the right e. It does not change state 5 Which of the following parameters for the setDirection method for bug will give the same result as setDirection with the parameter 45?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}