• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/37

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

37 Cards in this Set

  • Front
  • Back

Object

A software object is a piece of code that represents a real life object and consists of attributes and protocol.

An instance of a class. An object has both state, represented by its attributes, and behaviour, it's responses to the set of messages it understands (it's protocol). An object models a part of a solution to a software problem.

Variable

A variable is a named block of memory on a computer used to store information.

primitive type variable

A variable used to store primitive data types.

reference variable

A reference variable is used to hold a reference to a particular instance of an object. It holds the address of the object in the memory, it is not the object itself.
Instance variable

A variable defined in a class who's identifier and type appears in all instances (objects) of that class.

Integer data types

byte - Takes up 8 bits (1 byte) of memory
short - Takes up 16 bits of memory
int - Takes up 32 bits of memory
Long - Takes up 64 bits or memory
float - Takes up 32 bits of memory
double - Takes up 64 bits of memory
message
A request for an object to do something such as change its state or return a value.
message answer
A value or an object sent as a response to a message depending on what particular answer the message requires.
message expression
A message expression is a message-send that returns a value. They evaluate to the returned answer.
receiver
The object to which a message is sent.
getter message
A message that returns as its message answer the value of one of the receivers attributes.
setter message
A message that sets the value of a receivers attributes.
actual argument
Abbreviated to argument.

A value supplied with a message that is passed to a formal argument in a method for a method to complete it's job.

For example:

aFrog.setPosition(1);

formal argument

A variable declared in the method header that receives a value passed by an actual argument in order for a method to perform it's job.

For example:

public void setPosition(int aPosition);
protocol
A protocol is the set of messages a particular object understands. You cannot send a message to an object that is not in it's protocol.
expression
An expression is a piece of code that can be evaluated to provide a single output.

As an example a variable is an expression once it has been assigned a value as it can be evaluated to hold the value assigned to it.
sub expression
An expression used as an operand within a compound expression.
compound expression
An expression built up using expressions as its operands
source code
Source code is the code written by a programmer in an IDE or text editor.
Java Virtual Machine
A software layer that simulates a computer capable of interpreting bytecode. compiles bytecode using just in time compilation.
Just-in-time compilation
The process of generating real machine code from bytecode in small chunks of code just before they are executed the real machine code is then stored ready for subsequent executions. Also referred to as dynamic compilation.
statement
A statement is one line of code in a program finished with a semicolon.
assignment operator
The equals sign (=) used to assign a variable in an assignment statement.
assignment
The process that results in the variable on the left hand side of the assignment operator (=) receiving a copy of the value on the right-hand side of the assignment operator.
assignment statement
A statement that assigns a value to a variable.
literal
A textual representation of a primitive value or object. For example 'c' is a char literal and "hello world!" is a string literal.
escape character
A character used to mark the start of an escape sequence in a string. In Java this is the \ (backslash) character.
escape sequence
A sequence of characters started by an escape character that take on a different meaning for the compiler.
automatic type conversion
If you try to assign a small integer type such as int to a larger data type such as a double the JVM automatically converts the smaller type to the data type it is being assigned to, this is called automatic type conversion.
member
instance variables, instance methods, class variables and class methods are all members of a class.
access modifier
A keyword that controls visibility of class members to objects of other classes.
garbage collection
The automatic process of destroying variables that are no longer reference by objects in order to reclaim memory space. This process is carried out by the JVM.
What happens when you assign the data type char to the data type int?
The char is converted to its unicode value and stored as an unsigned integer in the data type int.
method signature
The name of the method and data types of any arguments required. eg:

setPosition(int)
getter method
a method corresponding to a getter message that returns an attribute of an object.

It is more correct to say that a getter method returns an attribute of an object rather than an a value of an instance as It may not return the value of an instance variable, it may return a value describing some feature of an object.
setter method
a method corresponding to a getter message that changes the state of a attribute of an object.

A setter method may except one form of data type as an argument but this data type may not be directly used to directly change the state of an object as it may be of the incorrect type so it is more correct to say that a setter method changes the state of an attribute rather than the state of an instance variable as it may not be directly doing so.
Encapsulation
Encapsulation is the term used to describe the packaging of related data and behaviour into a single entity.