CompSci 4 Test 1 Spring 2009 1. A 2a. br is a line break, move to the next line. b is for bold font 2b. The bold does not end and keeps going until there is an end tag, which there is not. 2c. Did you know? Duke University was created in 1924 by James Buchanan Duke as a memorial to his father. Note: "James...." to the end is all bold 3. A 4. D 5. C 6. D 7. one object should set its vehicle property to the other object. To unglue, the object should set its vehicle property to the world. 8A. howFar, whichWay B. 2, right C. direction D. world.makeDecision, boolean E. horse.gallop F. world.makeDecision value=5 is false G. left, 0.25 revs 9. see picture 10. A. 48 B. 31 C. value1 = 7, value2 = 7, value3 = 9 (there are lots of answers) OR value1 = 5, value2 = 5, value3 = 8 11. frog set vehicle to raft raft move forward lighthouse distance to raft - 1 - raft's width/2 - lighthouse width/2 ladybug move down raft's height frog move up 1 meter frog set vehicle to world raft turn right 2 revolutions Do Together frog move down 1 meter ladybug say "come back for me" 12. penguin turn to face item penguin move forward distance meters penguin turn right 1 revolution as seen by item 13.A. if item1's height > value return item1 else if item2's height > value return item2 else return item3 13. B. world.tallerThan item1=dragon item2=alienOnWheels item3=wizard value=1.5 set isShowing to false. 14.A if ball1 distance to PJ > ball2 distance to PJ return ball1 else return ball2 14. B. if ball1 distance to PJ > ball2 distance to PJ and ball1 distance to PJ > ball3 distance to PJ return ball1 else if ball2 distance to PJ > ball3 distance to PJ return ball2 else return ball3 ALT if (pj.furthestAway ball1=ball1 ball2=ball2) distance to PJ < ball3 distance to PJ return ball3 else return pj.furthestAway ball1=ball1 ball2=ball2