You are on page 1of 14

Section 2 1.

In Alice, objects inherit the characteristics of their: (1) Points Code Project Class (*) Program Correct Correct 2. In Alice, if a procedure is declared for MyClownFish, which classes can us e the procedure? Mark for Review (1) Points MyClownFish class and MySwimmer class MyClownFish class (*) MyPajamaFish class, MyClownFish class, and MySwimmer class Any class with "Fish" in the class name Incorrect Incorrect. Refer to Section 2 Lesson 4. 3. In Alice, new procedures that are declared for an instance appear in the p rocedures tab in the methods panel. True or false? Mark for Review (1) Points True (*) False Correct Correct 4. In Alice, which of the following programming statements moves the fish for ward, the distance to the rock, minus the depth of the rock? Mark for Review (1) Points this.Fish move forward {this.Rock getDistanceTo this.Fish - this.Fish getDep th} this.Fish move forward {this.Fish getDistanceTo this.Rock - this.Rock getDep th} (*) this.Fish move forward {this.Rock getDistanceTo this.Fish - this.Fish - 2} this.Rock move forward {this.Rock getDistanceTo this.Fish - this.Fish - 2} Mark for Review

Correct Correct 5. From your Alice lessons, at what point in the animation process do you con firm the items on the "Checklist for Animation Completion"? Mark for Review (1) Points At the end of the animation process. (*) During the animation process. At the beginning of the animation process. After adding each procedure to the code editor. Incorrect Incorrect. Refer to Section 2 Lesson 8. Section 2 6. From your Alice lessons, variables are fixed and cannot be changed. True o r false? Mark for Review (1) Points True False (*) Correct Correct 7. From your Alice lessons, you can run the animation to test that it works p roperly. True or false? Mark for Review (1) Points True (*) False Correct Correct 8. Main is an example of what in the following code? public static void main (String[] args) { System.out.println{"Hello World!"); } Mark for Review (1) Points An instance A method (*) A class A variable Correct Correct

9. What do lines 7, 10 and 13 do in the following code? Mark for Review (1) Points Export files called A, B, and num3. Create a single file containing A, B, and the value of num3. Print "A", "B" and the value of num3 on the screen. (*) None of the above. Correct Correct 10. A loop can be infinite (continue forever) or conditional (stops upon a co ndition). True or false? Mark for Review (1) Points True (*) False Correct Correct

Previous Page 2 of 10 Next Summary Section 2 11. In Alice, we use the While control statement to implement the conditional loop. True or false? Mark for Review (1) Points True (*) False Correct Correct 12. From your Alice lessons, the If control structure can process one true an d one false response. True or false? Mark for Review (1) Points True (*) False Correct Correct

13. In the Alice scene editor, where are the procedures located to precisely position an object? Mark for Review (1) Points Right click on the object, then select Procedures. (*) Right click on the object, then select Remove. In the gallery of classes. In the package located in the gallery. Correct Correct 14. From your Alice lessons, saving multiple versions of an Alice animation s cene is unimportant, because it does not save time. It actually wastes time. Tru e or false? Mark for Review (1) Points True False (*) Correct Correct 15. Which of the following are steps to use "drag-and-drop" positioning to po sition an Alice object in a scene? Mark for Review (1) Points Select the object with your cursor. Using your cursor, position the object in the scene. Select a handle style. All of the above (*) Correct Correct Section 2 16. In Java, which symbol is used to assign one value to another? Review (1) Points < > = (*) // Mark for

Correct Correct 17. Which of the following is not a valid arithmetic operator in Java? for Review (1) Points + / * % $ (*) Correct Correct 18. In Alice, the vehicle property will associate one object to another. True or false? Mark for Review (1) Points True (*) False Correct Correct 19. From your Alice lessons, where should comments be placed? ew (1) Points Above each set of programming statements. (*) At the end of the program. In the scene editor. In their own procedure. Correct Correct 20. In Alice, the procedures' arguments allow the programmer to adjust the ob ject, motion, distance amount, and time duration. True or false? Mark for Revi ew (1) Points True (*) False Mark for Revi Mark

Correct Correct Section 2 21. In Alice, functions are dragged into the control statement, not the proce dure. True or false? Mark for Review (1) Points True False (*) Correct Correct 22. The Alice code editor contains the tools you need to set up the backgroun d template and objects in the scene. True or false? Mark for Review (1) Points True False (*) Incorrect Incorrect. Refer to Section 2 Lesson 3. 23. In Alice, which of the following procedures play a sound? ew (1) Points playSound playAudio (*) playSoundFile playFile Correct Correct 24. In Alice, which of the following procedures resize a whole object? for Review (1) Points class_resize resizeHeight resize (*) resizeWidth Incorrect Incorrect. Refer to Section 2 Lesson 3. Mark Mark for Revi

25. From your Alice lessons, an algorithm that is done in order is in what ty pe of order? Mark for Review (1) Points Logical Sequential (*) Simultaneous Conflicting Correct Correct Section 3 26. Use your Greenfoot knowldege: Abstraction occurs in many different ways i n programming. True or false? Mark for Review (1) Points True (*) False Correct Correct 27. From your Greenfoot lessons, which of the following are examples of abstr action? Mark for Review (1) Points (Choose all correct answers) Playing a range of sounds when keyboard keys are pressed. (*) A single instance displays a single image. Assigning a different keyboard key to each instance. (*) Programming a single movement for a single instance. Assigning a different image file to each instance. (*) Correct Correct 28. In a Greenfoot loop constructor, which component is a counter that contro ls how many times the statement is executed? Mark for Review (1) Points Local loop While loop Loop variable (*)

Condition Correct Correct 29. From your Greenfoot lessons, what types of values cannot be stored in a l ocal variable? Mark for Review (1) Points Class name Objects Integers World name method (*) Incorrect Incorrect. Refer to Section 3 Lesson 10. 30. From your Greenfoot lessons, when do infinite loops occur? iew (1) Points When the loop is executed. Only in while loops. When the end to the code isn't established. (*) When the end to the act method isn't established. Incorrect Incorrect. Refer to Section 3 Lesson 10. Section 3 31. Which of the following type of audience should you ask to play your Green foot game during the testing phase? Mark for Review (1) Points Testing Target (*) Primary Programmer Incorrect Incorrect. Refer to Section 3 Lesson 4. 32. In Greenfoot, the image below is an example of what construct? Mark for Rev

Mark for Review (1) Points Method Comment Constructor (*) Class Incorrect Incorrect. Refer to Section 3 Lesson 12. 33. The image below is an example of what Greenfoot construct? Mark for Review (1) Points Method (*) Constructor Conditional Class Correct Correct 34. Which class holds the method that ends a Greenfoot game? w (1) Points Greenfoot (*) Class GreenfootImage Actor Correct Correct 35. In Greenfoot, an if-statement is used to alternate between displaying two images in an instance. True or false? Mark for Review (1) Points True False (*) Correct Correct Mark for Revie

Section 3 36. Using Greenfoot, how do we change the size and resolution of the World in stance? Mark for Review (1) Points Edit the methods in the class. Edit the values in the constructor. (*) Delete the instance. Edit the values in the class's act method. Incorrect Incorrect. Refer to Section 3 Lesson 8. 37. In Greenfoot, defined methods must be used immediately. True or false? Mark for Review (1) Points True False (*) Correct Correct 38. From your Greenfoot lessons, how do you call a defined method? Review (1) Points Call the method from the act method. (*) Call the method from the defined method. Write the method in the World superclass. Write the method in the instance. Write the method in the source code. Correct Correct 39. Use your Greenfoot knowledge to answer the question. One reason to write a defined method in a class is to change the behavior of the class. True or fals e? Mark for Review (1) Points True (*) False Correct Correct Mark for

40. What type of Greenfoot method would be used to turn an object? Review (1) Points orientTo( ); turnAround( ); move ( ); turn( ); (*) Correct Correct Section 3

Mark for

41. In the Greenfoot IDE, which of the following are components of a paramete r? Mark for Review (1) Points (Choose all correct answers) Parameter type (*) Parameter return Parameter name (*) Parameter method Parameter void Correct Correct 42. From your Greenfoot lessons, when a method needs additional data to perfo rm a task, this data comes from parameters. True or false? Mark for Review (1) Points True (*) False Correct Correct 43. From your Greenfoot lessons, to create a new instance of the Duke class, you right-click on the class, then select which of the following commands in the class menu? Mark for Review (1) Points New subclass... Set image...

new Duke() (*) Inspect Remove Correct Correct 44. In Greenfoot, which of the following are execution controls? eview (1) Points (Choose all correct answers) Run (*) Act (*) Speed (*) Move Turn Correct Correct 45. From your Greenfoot lessons, which of the following methods return the cu rrent rotation of the object? Mark for Review (1) Points World getClass() World getWorld() int getRotation() (*) getXY() Correct Correct Section 3 46. What type of parameter does the Greenfoot playSound method expect? for Review (1) Points name of a sound file (as String) (*) name of an integer (as int) name of a keyboard key (as String) name of the class (as String) Mark Mark for R

Correct Correct 47. From your Greenfoot lessons, the keyDown method is located in which class ? Mark for Review (1) Points Actor Greenfoot (*) GreenfootImage World Correct Correct 48. From your Greenfoot lessons, what can methods belong to? w (1) Points (Choose all correct answers) Galleries Classes (*) Scenarios Objects (*) All of the above Incorrect Incorrect. Refer to Section 3 Lesson 5. 49. In Greenfoot, you can use comparison operators to compare a variable to a random number. True or false? Mark for Review (1) Points True (*) False Correct Correct 50. From your Greenfoot lessons, which axes define an object's position in a world? Mark for Review (1) Points (Choose all correct answers) x (*) Mark for Revie

z y (*) w Correct Correct

You might also like