click below
click below
Normal Size Small Size show me how
Greenfoot Part 1
Greenfoot - Get Started, Add and position objects, Explore the Code editor
| Question | Answer |
|---|---|
| What are the 3 components of an initial scene? | background image , non-moving scenery objects, moving objects, |
| What are the 3 main areas of the Greenfoot IDE? | class display, world, execution controls, |
| What is the world? | where the action and user interaction take place |
| What is the position of the top left corner of the Greenfoot coordinate system? | (0,0) |
| What is the position of the top right corner of the default Greenfoot coordinate system? | (600, 0) |
| What is the position of the bottom right corner of the default Greenfoot coordinate system? | (600, 400) |
| What is the position of the bottom left corner of the default Greenfoot coordinate system? | (0, 400) |
| What is the class display? | where all of the Actor objects, or classes involved in the scenario can be seen |
| What is the code editor? | where you program the objects |
| What is in a class? | the specifications that define the appearance(attributes) and actions(methods) of an object. |
| What is the scene editor? | where you add and position instances of objects interactively |
| What is an object? | an instance of the class from which it was created |
| What are the parts of the act method? | a method signature(heading) and a body |
| Where is the method body located? | between the curly braces |
| What are programming statements within the curly braces called? | the body of the method |
| What is compilation? | the process of translating code you write into machine code the computer can understand |
| What is inheritance? | the relationship between superclass and subclass |
| What is a superclass? | a class that supplies attributes and behaviors to other classes |
| What is a subclass? | a class that inherits attributes and behaviors from another class |
| What are the two superclasses in Greenfoot? | World and Actor |
| What is considered a specialization of a class? | a subclass |
| What is required when a class is created or modified? | compilation |
| Which class would you create a subclass from to change the background image of a world? | World |
| What is source code? | defines what all instances of each class are capable of doing |
| What is the code editor? | displays the source code of a class and where you add programming instructions that enable instances of the class to act |
| What is the class description? | a set of comments that can be modified to describe the class |
| What is included in the class description? | a description of what the class does, name of the person who authored the code, date the source code was last modified |
| What is included in the class definition? | Java keywords or reserved words, name of the class as defined by the programmer, name of the superclass that the subclass extends |
| What does the class definition define? | Java libraries that must be imported to support the class; variables (or fields) that store data persistently within an instance, methods that provide the behaviors for an instance. constructor that initially sets up an instance. |
| What is the act() method? | the part of the class definition that tells objects which methods to perform when the Act or Run execution controls are clicked in the scenario |
| What does a method signature do? | describes what the method does |
| What is contained in the method signature? | a return type, method name and parameter list |
| What does the return type indicate? | whether the method will return something after execution |
| What does the parameter list allow? | values to be passed to a method |
| Why is it good practice to include comments in your code? | so that others can understand the purpose of the code |
| /* | starts block comments |
| */ | end block commments |
| // | starts single-line comment |
| What does documentation describe? | the properties of the class |
| What are methods? | a set of programmed operations or tasks that instances of a class can perform |
| What happens when a method is invoked? | it will perform the operation or task specified in the source code |
| What is the body of a method? | curly braces and coding statements within them |
| How are methods contained in the class body executed? | sequential order |
| What kind of errors does the compiler highlight? | syntax |