Section 1

Preview this deck

Variable declaration

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (41)

Section 1

(41 cards)

Variable declaration

Front

Variables can be created by writing a ____________ ___________

Back

Constructor

Front

A ________ of a class is a special kind of method that is executed automatically whenever a new instance is created.

Back

Assignment statement (=)

Front

We can store values into variables by using an ________ _________

Back

Source code

Front

Every class is defined by a ________ this code defines what objects of this class can do. You can look at it by opening the class's editor

Back

Objects

Front

Many___ can be created from a class

Back

Variables

Front

______ can be used to store information (objects or values) for later use

Back

Commands

Front

Methods with void return types represent

Back

Void Return Type

Front

Calling a method with a _______ ___________ __________ issues a command

Back

If/else statement

Front

The ___/____ _______ executes a segment of code when a given condition is true, and a different segment of code when it is false.

Back

Lifetime of instance variables

Front

Instance Variables that persist as long as the object exists to hold them

Back

Types

Front

Parameters and return have ____ Examples are int for numbers and Boolean for t/f values

Back

Questions

Front

Methods with non-void return types represent ______

Back

Error message

Front

When a class is compiled, the compiler checks to see whether there are any errors. If an error is found, an ________ ______________ is displayed.

Back

instance variables (fields)

Front

__________ _________ are variables that belong to an object (rather than a method)

Back

if statement

Front

An __ _______ can be used to write instructions that are only executed when a certain condition is true.

Back

Return type

Front

Of a method specifies what a method call will return

Back

Void

Front

A method with a ____ return type does not return a value

Back

Reference

Front

Objects are stored in variables by storing a ________ to the object

Back

New

Front

Java objects van be created programmatically (from within your code) by using the _____ keyword

Back

Lifetime of a local variable

Front

Logan variables persist only during a single method execution

Back

Object types

Front

Variables of _________ ________ store objects

Back

Equal

Front

We can test wheaten two things are _______ by using a double equal sign ==

Back

Actors

Front

Objects that can be placed into the world are known as ______

Back

Non-void return type

Front

Calling a method with a __________ _____ _____ asks a question.

Back

Subclass

Front

Is a class that represents a specialization of another. In greenfoot, this is shown with an arrow in the class diagram

Back

Class methods

Front

Methods that belong to classes (as opposed to objects) are marked with the key word Static in their signature. They are also called _____ ________

Back

method definition

Front

A _____ _______ defines a new action for objects of this class. The action is not immediately executed, but the method can be called with a method call later to execute it.

Back

Comments

Front

_________ are written into the source code as explanations for human readers. They are ignored by the computer.

Back

Parameter

Front

Additional information can be passed to some methods with the parentheses. The value passed is called a ____________.

Back

Method call

Front

a _____________ is an instruction that tells an object to perform an action. The action is defined by a method of the object.

Back

Inherits

Front

A subclass _____ all the message from its superclass. That means that it has, and can use all methods that it's superclass defines.

Back

GreenfootImage

Front

Greenfoot actors maintain their visible image by holding an object of type GreenfootImage. These are stored in an instance variable inherited from class Actor.

Back

In sequence

Front

Multiple instructions are executed __ ___________, one after the other, in the order in which they are written.

Back

API Documentation

Front

The ___ _________ lists all classes and methods available in Greenfoot. We often need to look up methods here.

Back

Primitive Types

Front

Variables of _________ _______ store numbers, Boolean, and characters;

Back

Companion

Front

Computers do not understand source code. It needs to be translated to a machine code before it can be executed.

Back

dot notation

Front

When a method we wish to call is not in our own class or inherited, we need to specify the class or object that has the method before the method name, followed by a dot. This is called ___ _______

Back

Classes

Front

Greenfoot senarios consist of a set of

Back

Methods

Front

Objects have ___ invoking there performs an action

Back

Parameter

Front

Is a mechanism to pass additional data to a method

Back

Signature

Front

The specification of a method, which shows its return type, name and parameters

Back