Greenfoot Application Programmers' Interface (API) (*)Ĭlass Application Programmers' Interface (API)ġ0. Where can we review the available classes and methods in Greenfoot, including the stop method? Mark for Review In the defined method in the source code.ĩ. (*)īetween the constructors and methods in the source code. Use your Greenfoot knowledge to answer the question: Where are defined variables typically entered in a class's source code? Mark for ReviewĪfter the constructors and methods in the source code.Īt the top of the source code, before the constructors and methods. In Greenfoot the showText() method belongs to which class? Mark for ReviewĨ. The name of the key to press on the keyboard. The password that will protect the class. The name of the sound file to play when the key is pressed. The name of the class that will use the key. What type of parameter does the keyDown method expect? Mark for Review In Greenfoot when you use the method to retrieve input from the user, the scenario will continue to run in the background? Mark for Reviewĥ. Which one of the following can be used to detect when 2 actors collide? Mark for ReviewĤ. In Greenfoot, defined methods must be used immediately. Which actor method is used to detect a simple collision? Mark for ReviewĢ. The first step to executing an if-else statement is to:_. From your Greenfoot lessons, which type of constructor can be used to automate creation of Actor instances? Mark for Reviewġ5. From your Greenfoot lessons, dot notation allows you to use a method from a different class, if the class you are programming does not possess the method. In Greenfoot you can use comparison operators to compare a variable to a random number. The instance executes all of the programming statements in their class's act method repeatedly until the scenario is stopped.ġ2. The instance executes all of the programming statements in their class's act method two times until the scenario is stopped. The class executes all of the programming statements in their instance's act method two times until the scenario is stopped. The instance executes all of the programming statements in their class's act method once. Only one instance moves until the pause button is clicked. In Greenfoot, what happens to an instance when the Act button is clicked in the environment? Mark for Review In Greenfoot, a subclass is a specialization of a superclass. In Greenfoot, after a subclass is created, what has to occur before instances can be added to the scenario? Mark for Reviewġ0. In Greenfoot, the class holds the general attributes of an instance, such as the methods it inherits. An if-statement requires which type of information returned from the condition? Mark for ReviewĨ. In Greenfoot, which of the following methods return the world that the instance lives in? Mark for Reviewħ. An instance variable can be saved and accessed later, even if the instance no longer exists. In Greenfoot, the turn method expects what type of information in its parameters? Mark for Reviewĥ. In Greenfoot, the body of the method is located in between which of the following characters? Mark for ReviewĤ. In Greenfoot, the move method expects what type of information in its parameters? Mark for Reviewģ. Which of the following is an incorrectly written programming statement? Mark for ReviewĢ. * That is: create the initial objects and add them to the world.īackSound = new GreenfootSound("musik.1. * Prepare the world for the start of the program. Int y = Greenfoot.getRandomNumber(getHeight()) Int x = Greenfoot.getRandomNumber(getWidth()) Create a new world with 600x400 cells with a cell size of 1x1 pixels. * Constructor for objects of class MyWorld. Selengkapnya, bisa kalian lihat coding berikut ini import greenfoot.* // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) Setelah proses di atas sudah dilakukan dengan sempurna, langkah terakhir adalah dengan menyisipkan method play() atau stop() pada class MyWorld Contoh Coding Agar musik yang kalian inginkan dapat dimainkan, Letakkan file tersebut pada folder Sounds pada project yang kalian gunakan
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |