Which of the following is an example of string concatenation? In Greenfoot, what is a common letter used for the loop variable? The condition becomes false after one minute of executions. If an end to a while loop is not established, what happens? From your Greenfoot lessons, abstraction techniques can only be used once in a class's source code. Casting is when we change the coordinates of an actor Correctġ2. Mark for Review (1) Points Casting is when we remove an object from the world Casting is when we want to tell the java compiler that a class we are accessing is really another type of class (*) Casting is when we reset the state of an instance. From your Greenfoot lessons, which one of the following is an example of when an abstraction technique is used?Īdding a property to an instance Initialising a variable Adding a property to a Class Passing a paramater in a constructor to set an initial speed. In Greenfoot, a constructor has a void return type. In Greenfoot, which method body correctly adds an instance of the World to a scenario, with size x = 300 y = 300 and a resolution of 2 pixels per cell? (Choose all correct answers) public variable-name variable type public variable-type variable-name (*) private variable-type variable-name (*) private variable-name, variable-type Correct 8. Which of the following answers have the correct syntax for declaring a class variable in Greenfoot? R does the isKeyDow n method expect? String (*) Boolean Method Integer Correct 7. You can only use the sounds that are stored in the Greenfoot library. You cannot record unique sounds in Greenfoot. In Greenfoot you can interact with the scenario using a mouse. Instance method Defined method (*) Class method World method Code method Incorrect. From your Greenfoot lessons, to save space in the act method, you can write an entirely new method below it, called a _. IsCollision() isTouching() (*) hasCollided() isContact() Incorrect. Which one of the following can be used to detect when 2 actors collide? One reason to write a defined method in a class is to make it easier to read. Use your Greenfoo t knowledg e to answer the question. Logic operators (*) Keyboard key names Integers String concatenation 1. In Greenfoot, what type of symbol is used to connect boolean expressions? Within the world constructor Within the act method Within the scenario Within loop constructs (*) Incorrect. In Greenfoot, when is a local variable most often used? When the end to the act method isn't established. When the end to the code isn't established. From your Greenfoot lessons, when do infinite loops occur? In Greenfoot modifying an actors constructor to accept an initial speed is a form of abstraction? (*) Adding a property to a Class Incorrect. 11.From your Greenfoot lessons, which one of the following is an example of when an abstraction technique is used?Īdding a property to an instance Initialising a variable Passing a paramater in a constructor to set an initial speed. In Greenfoot, you can cast an Actor class to a World class? In Greenfoot, which method is used to end a game?ĭuke.stop( ) Game.stop(1) Greenfoot.stop( ) (*) Class.stop( ) Correctġ0. The GreenfootImage class enables Greenfoot actors to maintain their visible image by holding an object of type GreenfootImage. In Greenfoot, the = operator is used to test if two values are equal. True (*) False Correct 5.In Greenfoot when you use the method to retrieve input from the user, the scenario will continue to run in the background?įalse (*) Correct 6.In Greenfoot, you can only interact with the scenario using a keyboard. True (*) False Correct 4.In Greenfoot, the sound file must be saved in the scenario and written in the source code for it to play. 3.In Greenfoot, a way to have all subclasses of a superclass inherit a method is by adding the method to the superclass. HasCollided() hasTouched() isCollision() isInContactWith() isTouching() (*) Incorrect. True (*) False Correct 2.Which actor method is used to detect a simple collision? Section 3 - Quiz 2 L6-L10 (Answer all questions in this section) 1.In Greenfoot a collision is when 2 actors touch?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |