260597008-quizzz

Share Embed Donate


Short Description

midterm...

Description

Which Alice control statement executes a set of procedures simultaneously? Mark for Review Together Do together (*) Do in order While 2. Which Alice execution task corresponds with the following storyboard statemen t? Cat rolls to the left. Mark for Review roll Left 1 this.Cat roll Left 1.0 (*) Cat roll Left 1 Cat roll Right 1 Correct 3. In Alice, control statements are dragged into the Code editor. True or false? Mark for Review (1) Points True (*) False Correct 4. In Alice, the while control statement executes a set of procedures a specific number of times. True or false? Mark for Review (1) Points True False (*) Correct 5. In Alice, the computer specifies the low and high range values for the range of numbers from which to pull a randomized number. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 2 Lesson 4. 6. In Alice, which of the following arguments could be replaced with a random nu mber? Mark for Review (1) Points (Choose all correct answers) Distance (*) Object name Duration (*) Direction Procedure name 1. In Alice, which of the following is not a control statement? Mark for Review (1) Points Do In Order While Count Move (*) Incorrect. Refer to Section 2 Lesson 6. 2. In Alice, which control statement is used to invoke simultaneous movement? Ma rk for Review (1) Points

Do Together (*) Do In Order While Count Variable Incorrect. Refer to Section 2 Lesson 6. 3. In Alice, a walking motion for a bipedal object o Together control statement. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 2 Lesson 6. 4. In Alice, different programming is not required e all objects move the same way. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 2 Lesson 6. 5. In Alice, when two objects are synchronized and t one object is: Mark for Review (1) Points A vehicle of another (*) A class of another An object of another An instance of another Incorrect. Refer to Section 2 Lesson 6. 6. In Alice, which procedure is used to assign one her? Mark for Review (1) Points setClassVehicle setObjectVehicle setVehicle (*) Vehicle Correc

can be achieved without the D

for different objects, becaus

move together, this means tha

object as the vehicle of anot

1. In Alice, where can you view the list of functions available for an object? M ark for Review (1) Points Class description in the Scene editor. Functions tab in the methods panel. (*) Instance pull-down menu. Properties tab in the methods panel. Correct 2. In Alice, functions ask questions about an object. True or false? Mark for Re view (1) Points True False (*) Correct In Alice, the If control structure can process one true and one false response. True or false? Mark for Review (1) Points True (*) False Correct

2. The Alice If control structure requires the false statement to be populated. True or false? Mark for Review (1) Points True False (*) Correct 3. A conditional loop is a loop that will continue forever. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 2 Lesson 8. 4. In Alice, we use the While control statement to implement the conditional loo p. True or false? Mark for Review (1) Points True (*) False An example of an expression is: Mark for Review (1) Points "I feel happy." If or Where 3x3=9 (*) Move forward 1 meter Incorrect. Refer to Section 2 Lesson 9. 2. Alice uses built-in math operators. They are: Mark for Review (1) Points Add Subtract Multiply Divide All of the above (*) Incorrect. Refer to Section 2 Lesson 9. 3. In Alice, which of the following programming statements moves the alien backw ard the distance to the asteroid, minus 2 meters? Mark for Review (1) Points this.Alien move backward {this.Alien getDistanceTo this.Asteroid -2} (*) this.Alien move backward {this.Alien getDistanceTo this.Asteroid * 2} this.Asteroid move backward {this.Alien getDistanceTo this.Asteorid / 2} this.Alien move forward {this.Asteroid getDistanceTo this.Alien / 2} Incorrect. Refer to Section 2 Lesson 9. 4. In Alice, which of the following programming statements moves the cat forward the distance to the bird? Mark for Review (1) Points this.Cat move forward {this.Bird getDistanceTo this.Cat / 2} this.Cat move {this.Bird getDistanceTo this.Cat / 2} this.Bird move forward {this.Bird getDistanceTo this.Cat} this.Cat move forward {this.Cat getDistanceTo this.Bird} (* Which is an example of the Boolean variable type? Mark for Review (1) Points 3 Hello World True or False (*) An object

Correct 2. The initializer of a variable with a TextString value type could be (select a ll that apply): Mark for Review (1) Points (Choose all correct answers) "Greetings" (*) "Howdy" (*) "4" (*) None of the above. With keyboard controls, you can create Alice animations where the user controls an object that interacts with other objects. True or false? Mark for Review (1) Points True (*) False Correct 2. Event listeners look for and resopnd to the interactivity of the computer. Tr ue or false? Mark for Review (1) Points True False (*) As the Alice programmer, you render the animation on your own. True or false? Ma rk for Review (1) Points True False (*) Incorrect. Refer to Section 2 Lesson 12. 2. In Alice, what are the forms of a scenario? Mark for Review (1) Points (Choose all correct answers) A section of code to write. A problem to solve. (*) A task to perform. (*) A person to help. A system to start. Incorrect. Refer to Section 2 Lesson 12. 3. What can be used as a guideline to ensure your Alice animation fulfills anima tion principles? Mark for Review (1) Points The Internet An animation checklist (*) A close friend Other programmers Correct 4. The animation checklist helps you confirm that all elements of the Alice anim ation are operating as expected. True or false? Mark for Review (1) Points True (*) False Correct 5. Which of the following elements of the Alice animation should be tested befor e the animation is considered complete? Mark for Review (1) Points

Math calculations operate as expected. Objects move with smooth timing. Comments are added to each sequence of instructions. Control statements are operating as expected. All of the above. (*) Incorrect. Refer to Section 2 Lesson 12. 6. The Alice animation should be tested throughout development, not just at the end of the animation's development. True or false? Mark for Review (1) Points True (*) False Correct 7. What type of Alice listener object is required to target a mouse-click on any object in the scene, allowing the user to drag that object around the scene when the animation is run ning? Mark for Review (1) Points addDefaultManipulation procedure addMouseListener procedure addDefaultModelManipulation procedure (*) addListener procedure http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y 1 of 2 3/27/2015 5:49 AM Correct 8. In which Alice class is the addDefaultModelManipulation procedure located? Ma rk for Review (1) Points Object class Scene class (*) myFirstMethod class Quadruped class Incorrect. Refer to Section 2 Lesson 12. 9. When presenting your Alice animation, ensure that your presentation is thorou ghly tested and complete. True or false? Mark for Review (1) Points True (*) False Correct 10. When presenting your Alice animation, it is not important to give the audien ce a reason to listen to the presentation. True or false? Mark for Review (1) Points True False (*) As the Alice programmer, you render the animation on your own. True or false? Ma rk for Review (1) Points True False (*) Incorrect. Refer to Section 2 Lesson 12. 2. In Alice, what are the forms of a scenario? Mark for Review (1) Points (Choose all correct answers)

A section of code to write. A problem to solve. (*) A task to perform. (*) A person to help. A system to start. Incorrect. Refer to Section 2 Lesson 12. 3. What can be used as a guideline to ensure your Alice animation fulfills anima tion principles? Mark for Review (1) Points The Internet An animation checklist (*) A close friend Other programmers Correct 4. The animation checklist helps you confirm that all elements of the Alice anim ation are operating as expected. True or false? Mark for Review (1) Points True (*) False Correct 5. Which of the following elements of the Alice animation should be tested befor e the animation is considered complete? Mark for Review (1) Points Math calculations operate as expected. Objects move with smooth timing. Comments are added to each sequence of instructions. Control statements are operating as expected. All of the above. (*) Incorrect. Refer to Section 2 Lesson 12. 6. The Alice animation should be tested throughout development, not just at the end of the animation's development. True or false? Mark for Review (1) Points True (*) False Correct 7. What type of Alice listener object is required to target a mouse-click on any object in the scene, allowing the user to drag that object around the scene when the animation is run ning? Mark for Review (1) Points addDefaultManipulation procedure addMouseListener procedure addDefaultModelManipulation procedure (*) addListener procedure http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y 1 of 2 3/27/2015 5:50 AM Correct 8. In which Alice class is the addDefaultModelManipulation procedure located? Ma rk for Review (1) Points Object class Scene class (*) myFirstMethod class

Quadruped class Incorrect. Refer to Section 2 Lesson 12. 9. When presenting your Alice animation, ensure that your presentation is thorou ghly tested and complete. True or false? Mark for Review (1) Points True (*) False Correct 10. When presenting your Alice animation, it is not important to give the audien ce a reason to listen to the presentation. True or false? Mark for Review (1) Points True False (*) In Greenfoot, what happens to an instance when the Act button is clicked in the environment? Mark for Review (1) Points Only one instance moves until the pause button is clicked. The instance executes all of the programming statements in their class's act met hod once. (*) The instance executes all of the programming statements in their class's act met hod repeatedly until the scenario is stopped. The instance executes all of the programming statements in their class's act met hod two times until the scenario is stopped. The class executes all of the programming statements in their instance's act met hod two times until the scenario is stopped. Incorrect. Refer to Section 3 Lesson 1. 2. In Greenfoot, the Run button repeatedly executes all of the programming state ments inthe class's act method in sequential order until the pause button is clicked. True o r false? Mark for Review (1) Points True (*) False Correct 3. An object is an instance of a class. True or false? Mark for Review (1) Points True (*) False Correct 4. In Greenfoot, the class holds the general attributes of an instance, such as the methods it inherits. True or false? Mark for Review (1) Points True (*) False Correct 5. A subclass has what kind of relationship to a superclass? Mark for Review (1) Points

"for-what" "a-is" "is-a" (*) "is-by" Incorrect. Refer to Section 3 Lesson 1. 6. What does an instance of the World class do? Mark for Review (1) Points Provide the acting objects for the scenario. Provide the background scenery for the scenario. (*) Provide the superclass for acting objects. Provide the source code for instances. Correct 7. In Greenfoot, after a subclass is created, what has to occur before instances can be added to the scenario? Mark for Review (1) Points Creation of an instance Compilation (*) Creation of source code Editing of source code http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y 1 of 2 3/27/2015 5:51 AM Correct 8. In Greenfoot, after a subclass is created and compiled, you cannot edit the s ubclass's source code. True or false? Mark for Review (1) Points True False (*) In Greenfoot, the move method expects what type of information in its parameters ? Mark for Review (1) Points Degrees to turn True or false response String statement Integer of steps to move forward (*) Incorrect. Refer to Section 3 Lesson 2. 2. In Greenfoot, the turn method expects what type of information in its paramet ers? Mark for Review (1) Points Degrees to turn (*) True or false response String statement Integer of steps to move forward Parameter void Incorrect. Refer to Section 3 Lesson 2. 3. Using the Greenfoot IDE, only five instances can be added to a scenario. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 3 Lesson 2. 4. In Greenfoot, the instance has a source code editor. True or false? Mark for Review (1) Points True False (*)

Incorrect. Refer to Section 3 Lesson 2. 5. In the Greenfoot IDE, an instance's position is on the x and y coordinates. T rue or false? Mark for Review (1) Points True (*) False Correct 6. In Greenfoot, which of the following options are not possible when associatin g an image file with an instance? Mark for Review (1) Points Add a video (*) Draw an image Import an image Select an image from the Greenfoot library Incorrect. Refer to Section 3 Lesson 2. 7. An instance variable can be saved and accessed later, even if the instance no longer exists. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 3 Lesson 2. 8. A variable is also known as a ____________. Mark for Review (1) Points Instance http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y 1 of 2 3/27/2015 5:53 AM Class Field (*) Syntax Method Incorrect. Refer to Section 3 Lesson 2. 9. In Greenfoot, the body of the method is located in between which of the follo wing characters? Mark for Review (1) Points Parnetheses ( ) Curly brackets { } (*) Square brackets [ ] Asterisks ** Correct 10. In Greenfoot, methods can be called in the act method. When the Act button i s clickedin the environment, the methods in the method body of the act method are executed. True or false? Mark for Review (1) Points True (*) False Which of the following is an incorrectly written programming statement? Mark fo r Review (1) Points move(): (*) move(2); turn(25); turn(2);

Incorrect. Refer to Section 3 Lesson 4. 2. Which of the following features of Greenfoot will teach you how to identify b ugs in your program? Mark for Review (1) Points Code editor Compilation (*) Instance creation Documentation Correct 3. In object oriented programming, programmers analyze a problem and create obje cts to solve the problem. True or false? Mark for Review (1) Points True (*) False Correct 4. From your Greenfoot lessons, Which of the following statements is most correc t? Mark for Review (1) Points My program is complete when it compiles. My program is complete when I add music to it. My program is complete when it runs and I've tested the code. (*) My program is complete when I add images to it Which of the following Greenfoot methods returns a random number between 0, up t o and including 10,000? Mark for Review (1) Points Greenfoot.getRandomNumber(10,000) Greenfoot.getRandomNumber(10,001) (*) Greenfoot.getRandomNumber(9,999) Greenfoot.getRandomNumber(0-10,000) Correct 2. What does the following Greenfoot programming statement tell the class to do? if (Greenfoot.getRandomNumber(100) < 6) { turn(18); } Mark for Review (1) Points If a random number is returned that is greater than 6, turn 18 degrees. If a random number is returned that is less than 6, move 18 steps. If a random number is returned that is less than 6, turn 18 degrees. (*) Turn 6 degrees, then turn 18 degrees. Incorrect. Refer to Section 3 Lesson 5. 3. Which of the following comparison operators represents "greater than or equal "? Mark for Review (1) Points > >= (*) = = ! = Correct 4. In Greenfoot you can use comparison operators to compare a variable to a rand om number. True or false? Mark for Review (1) Points True (*)

False Correct 5. An if-else statement executes its first code block if a condition is true, an d its second code block if a condition is false, but not both. True or false? Mark for Review (1) Points True (*) False Correct 6. The first step to executing an if-else statement is to:____________. Mark for Review (1) Points Execute the if statement Execute the else statement Evaluate the class Evaluate the condition (*) Incorrect. Refer to Section 3 Lesson 5. 7. The list below displays characteristics of a Greenfoot world constructor, exc ept for one. Which one should be removed? Mark for Review (1) Points Defines the instance's size and resolution. Has a void return type. (*) Has no return type. Has the same name as the name of the class. Executed automatically when a new instance of the class is created. Incorrect. Refer to Section 3 Lesson 5. http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y 1 of 2 3/27/2015 5:59 AM 8. In Greenfoot, which keyword calls the World superclass? Mark for Review (1) Points world constructor super (*) addObject new Correct 9. In Greenfoot, which of the following is the correct notation for calling a me thod foran instance of a class? Mark for Review (1) Points object-name.method-name(parameters); (*) class-name.method-name(parameters); Method-name.object-name(parameters); Method-name.object-name; Correct 10. In Greenfoot, a semicolon is not necessary at the end of a method that uses dot notation. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 3 Lesson 5. 11. In Greenfoot, the origin of the world coordinate system (0,0) starts in the center ofthe world. True or false?

Mark for Review (1) Points True False (*) Incorrect. Refer to Section 3 Lesson 5. 12. Which keyword indicates that Greenfoot needs to create a new object? Mark f or Review (1) Points new (*) addObject newObject newClass In the Greenfoot IDE, any new methods you create are written in the class's sour ce code, below the act method. True or false? Mark for Review (1) Points True (*) False Correct 2. In reference to Greenfoot, if the following method was defined in a superclas s, public void lookForEdge(){ ... } all subclasses of the superclass will inherit the method. True or false? Mark for Review (1) Points True (*) In Greenfoot, the sound file must be saved in the scenario and written in the so urce code for it to play. True or false? Mark for Review (1) Points True (*) False Correct 2. You cannot record unique sounds in Greenfoot. You can only use the sounds tha t are stored in the Greenfoot library. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 3 Lesson 7. 3. What type of parameter does the keyDown method expect? Mark for Review (1) Points The password that will protect the class. The name of the key to press on the keyboard. (*) The name of the class that will use the key. The name of the sound file to play when the key is pressed. In Greenfoot, which method body correctly adds an instance of the World to a sce nario, with size x = 300 y = 300 and a resolution of 2 pixels per cell? Mark for Review

(1) Points world(300, 300, 2); Super(300,300,2); super(2,300,300); super(300,300,2); (*) Incorrect. Refer to Section 3 Lesson 8. 2. A constructor is executed once in the course of a Greenfoot scenario. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 3 Lesson 8. 3. Which of the following Greenfoot programming statements creates a new instanc e of Duke, and places him at x = 140, y = 130 in the world? Mark for Review (1) Points addObject(new( ), 140, 130); addObject(new Duke( ), 140, 130); (*) new(addObject(Duke ), 140, 130); new(Duke( ) 140, 130); Correct 4. Which keyword is used to add an actor to a Greenfoot world? Mark for Review (1) Points addObject add new (*) super Incorrect. Refer to Section 3 Lesson 8. 5. Which of the following is the correct syntax for declaring a variable in Gree nfoot? Mark for Review (1) Points (Choose all correct answers) public variable-type variable-name; (*) private variable-name, variable-type; public variable-name variable type; private variable-type variable-name; (*) Incorrect. Refer to Section 3 Lesson 8. 6. In Greenfoot, what is the purpose of the variable type? Mark for Review (1) Points Defines the access specifier used with the variable. Defines what kind of data to store in the variable. (*) Defines which class the variable is associated with. Defines the instance that the variable is associated with. Correct 7. Which operator is used to test if values are equal? Mark for Review (1) Points < == (*) > http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y 1 of 2 3/27/2015 6:04 AM !> Incorrect. Refer to Section 3 Lesson 8. 8. In Greenfoot, the == operator is used to test if two values are equal. True o r false? Mark for Review (1) Points True (*) False Correct

9. The GreenfootImage class enables Greenfoot actors to maintain their visible i mage by holding an object of type GreenfootImage. True or false? Mark for Review (1) Points True (*) False Correct 10. What does the following programming statement mean? image1 = new GreenfootImage("duke12.png?); Mark for Review (1) Points The variable, image1, cannot use the image file, duke12.png. The image file, duke12.png, has just been drawn and imported into the scenario. The image file, duke12.png, is assigned to the variable image1. (*) Image files from 1-119 are associated with image1. Incorrect. Refer to Section 3 Lesson 8. 11. In Greenfoot, which method is used to end a game? Mark for Review (1) Points Class.stop( ); Greenfoot.stop( ); (*) Duke.stop( ); Game.stop(1); Correct 12. Where can we review the available classes and methods in Greenfoot, includin g the stop method? Mark for Review (1) Points Class menu Object menu Class Application Programmers' Interface (API) Greenfoot Application Programmers' Interface (API) (* From your Greenfoot lessons, which of the following are examples of when abstrac tion techniques are used? Mark for Review (1) Points Assigning a sound file to an instance. Assigning a keyboard key to an instance. Assigning an image file to an instance. All of the above. (*) Incorrect. Refer to Section 3 Lesson 9. 2. Abstraction occurs in many different ways in programming. True or false? Mark for Review (1) Points True (*) False From your Greenfoot lessons, which of the following are examples of actions that can be achieved using the while loop? Mark for Review (1) Points Create 50 instances of the Duke class. Call the move method 1 million times. Call the move and turn methods 10 times.

Create 100 instances of an Actor subclass. All of the above. (*) Incorrect. Refer to Section 3 Lesson 10. 2. Which of the following is not a component of a while loop? Mark for Review (1) Points Local variable Control operator Loop variable if statement (*) while keyword Incorrect. Refer to Section 3 Lesson 10. 3. If an end to a while loop is not established, what happens? Mark for Review (1) Points The code stops after 10 executions. The code stops after 20 executions. The condition becomes false after one minute of executions. The code executes and does not stop. (*) Incorrect. Refer to Section 3 Lesson 10. 4. Infinite loops are a common cause of errors in programming. True or false? Ma rk for Review (1) Points True (*) False Correct 5. An array is an object that holds multiple methods. True or false? Mark for Re view (1) Points True False (*) Incorrect. Refer to Section 3 Lesson 10. 6. In Greenfoot, arrays are a way to hold and access multiple variables, and ass ign different values to new instances each time the while loop executes and produces a new instance. True or false? Mark for Review (1) Points True (*) False Correct 7. Which of the following Greenfoot logic operators represents "not"? Mark for Review (1) Points & && = ! (*) Correct http://ilearning.oracle.com/ilearn/en/assessment/jsp/test_player.jsp?Init=Y 1 of 2 3/27/2015 6:07 AM 8. In the Greenfoot IDE, what does the AND operator (&&) do? Mark for Review (1) Points Compares two boolean values, and returns a boolean value which is true if and on ly ifboth of its operands are true. (*) Compares two boolean values, and returns a boolean value which is true if and on ly ifone of its operands are true. Compares two boolean values and returns a boolean value which is true if either one of the operands is true.

Compares two boolean variables or expressions and returns a result that is true if either of its operands are true. Correct 9. In Greenfoot, a local variable is declared at the beginning of a class. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 3 Lesson 10. 10. In Greenfoot, what types of values cannot be stored in a local variable? Mar k for Review (1) Points Class name Objects Integers World name Method (*) Incorrect. Refer to Section 3 Lesson 10. 11. In Greenfoot, string concatenation reduces the number of redundant character s or phrases you need to type into each array. True or false? Mark for Review (1) Points True (*) False Correct 12. Which of the following is an example of string concatenation? Mark for Revi ew (1) Points Instead of entering ".png" after each image file name, add && ".png" after the i mageName value in the programming statement. Instead of entering ".png" after each image file name, add = ".png" after the im ageName value in the programming statement. Instead of entering ".png" after each image file name, add + ".png" after the im ageName value in the programming statement. (*) Instead of entering ".png" after each image file name, add ".png" after the imag eName value in the programming statement. From your Greenfoot lessons, the __________ control structure is used to compare and make a decision. Mark for Review (1) Points Conditional (*) Repetition Obsolete Rewind Incorrect. Refer to Section 3 Lesson 12. 2. From your Greenfoot lessons, the __________ control structure is often referr ed to asloops. Mark for Review (1) Points Conditional Repetition (*) Obsolete Rewind Incorrect. Refer to Section 3 Lesson 12.

3. The construct listed below is described as a __________________. /** * Get value and store in variable */ Mark for Review (1) Points Method Comment (*) Variable Assignment Instruction Correct 4. The construct listed below is described as a __________________. termvar = scanterm.nextLine(); Mark for Review (1) Points Method Comment Variable Assignment (*) Instruction Correct 5. What is wrong with the following line of code? System.out.println(termvar + '; '+ termdef ); Mark for Review (1) Points There are parenthesis instead of brackets. There are parenthesis instead of curly braces. There are single quotes instead of double quotes. (*) The command is incorrectly capitalized. Nothing is wrong with the code. Incorrect. Refer to Section 3 Lesson 12. 6. Which line of code contains a syntax error? Mark for Review (1) Points 2 3 (*) 4 5 6 Incorrect. Refer to Section 3 Lesson 12. 7. In which step to create a Greenfoot game do you find and resolve errors in th e game? Mark for Review (1) Points Define the problem Design the solution Program the solution Test the solution (*) Incorrect. Refer to Section 3 Lesson 12. 8. In which step to create a Greenfoot game is the solution implemented? Mark fo r Review (1) Points Define the problem Design the solution Program the solution (*) Test the solution Incorrect. Refer to Section 3 Lesson 12. 9. From your Greenfoot lessons, which of the following are examples of Q/A test variations? Mark for Review (1) Points Change the environment, change the programmer, change the execution Change the execution, change the data, change the environment (*)

Change the environment, change the execution, change the language All of the above. Correct 10.The variations listed below are examples of changing what part of Q/A testing ? Input numbers when characters are expected Input characters when numbers are expected Input symbols Mark for Review (1) Points Change the environment Change the execution Change the data (*) None of the above In Alice, which of the following is the most likely situation where procedural a bstraction could be used? Mark for Review (1) Points Five dogs all need to bark and run at the same time. (*) One fish needs to swim forward 1 meter. Two fish say something to each other. One person moves up 10 meters. Incorrect. Refer to Section 2 Lesson 5. 2. From your Alice lessons, where on an object do an object's axes intersect? Ma rk for Review (1) Points At the object's chest At the object's head At the object's center point (*) At the object's bottom Correct 3. From your Alice lessons, which control statement executes instructions simult aneously? Mark for Review (1) Points Do in order Count Variable Do together (*) Incorrect. Refer to Section 2 Lesson 4. 4. In Alice, which of the following programming statements moves the cat backwar d, half the distance to the bird? Mark for Review (1) Points this.Cat move backward {this.Bird getDistanceTo this.Cat / 2} this.Cat move forward {this.Bird getDistanceTo this.Cat / 2} this.Bird move forward {this.Bird getDistanceTo this.Cat / 2} this.Cat move backward {this.Cat getDistanceTo this.Bird / 2} (*) Correct 5. In Alice, a computer program requires functions to tell it how to perform the procedure. True or false? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 2 Lesson 6.

Define the value of the variable LapCount based on the following math calculatio n: LapCount + 10 = 15 Mark for Review (1) Points 2 4 5 (*) 15 10 Correct 7. The Alice IF control structure requires the false statement to be populated. True or false? Mark for Review (1) Points True False (*) Correct 8. The say procedure in Alice plays an audio file. True or false? Mark for Revie w (1) Points True False (*) Incorrect. Refer to Section 2 Lesson 3. 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. Incorrect. Refer to Section 2 Lesson 14. 10.Which of the following are examples of elements you would test in your Alice animation? Mark for Review (1) Points (Choose all correct answers) All of the procedures display in alphabetical order in the Procedures tab. Math expressions calculate as expected. (*) Objects move with smooth timing. (*) Use your Greenfoot knowldege: Abstraction occurs in many different ways in progr amming. True or false? Mark for Review (1) Points True (*) False Correct 27.From your Greenfoot lessons, where do you review a class's inherited methods? Mark for Review (1) Points Act method Documentation (*) Inspector If-statement Incorrect. Refer to Section 3 Lesson 3. Section 4 (Answer all questions in this section) 28.Which of the following defines a driver class? Mark for Review (1) Points Contains a main method and other static methods. (*) Contains classes that define objects.

Contains a main method, a package, static methods, and classes that define objec ts. None of the above. Incorrect. Refer to Section 4 Lesson 2. 29.Examine the following code: What is the value of variable x? Mark for Review (1) Points 2 (*) 2.5 6 14 Correct 30.When converting gallons to liters its best to put the calculation result into a variable with a _______________ data type. Mark for Review (1) Points int double (*) boolean None of the above Incorrect. Refer to Section 4 Lesson 1 Four variables are required to support a conversion of one unit of measure to an other unit of measure. True or False? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 4 Lesson 1. 32. Given the code String s1 = "abcdef"; String s2 = "abcdef"; String s3 = new String(s1); Which of the following would equate to false? Mark for Review (1) Points s1 == s2 s1 = s2 s3 == s1 (*) s1.equals(s2) s3.equals(s1) Incorrect. Refer to Section 4 Lesson 4. 33. The following code is an example of creating a String reference: String s; True or false? Mark for Review (1) Points True (*) False Incorrect. Refer to Section 4 Lesson 4. Section 5 (Answer all questions in this section) 34. Which of the following correctly matches the switch statement keyword to its function? Mark for Review (1) Points (Choose all correct answers) switch: tells the compiler the value to compare the input against

default: signals what code to execute if the input does not match any of the cas es (*) case: signals what code is executed if the user input matches the specified elem ent (*) if: records the user's input and sends it to the case statements to find a possi ble match switch: identifies what element will be compared to the element of the case stat ements to find a possible match (*) Incorrect. Refer to Section 5 Lesson 1. 35. Why are loops useful? Mark for Review (1) Points They save programmers from having to rewrite code. They allow for repeating code a variable number of times. They allow for repeating code until a certain argument is met. All of the above. (*) What is the output of the following segment of code? int array[][] = {{1,2,3},{3,2,1}}; for(int i=0;i
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF