• 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/301

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;

301 Cards in this Set

  • Front
  • Back

absolute pathname

A full path to a file beginning from the name of the storage device.

abstract class

A class that defines a common message protocol and common set of instancevariables for its subclasses. In Java an abstract class cannot be instantiated.

abstract method

A method declared as abstract. Abstract methods have no bodies. Theymust be implemented in any concrete subclasses of the class in which they arespecified. Interfaces also specify abstract methods, which must beimplemented by classes implementing the interface.

access level

The scope for access that exists for a software component such as a method.There are four access levels in Java: public, private, protected anddefault. The default level occurs when no access modifier is specified.

access modifier

One of three Java keywords (public, private, protected) which specifythe visibility of variables and methods.

accessor message

Another name for a getter message.

accessor method

Another name for a getter method.

actual argument

An actual argument is a value used in a message that is copied to a formalargument for use inside the corresponding method. Actual arguments must beof a compatible type with their corresponding formal arguments.

annotation

An annotation is a piece of code in a source file that indicates a programmer’sintention to the compiler. The only annotation we use in M250 is @Override.All annotations begin with the character @ in Java.

array

An indexable, fixed-size collection whose elements are all of the same type.

array initialiser

An expression that can be used to initialise an array using assignment, ashortcut way of initialising array elements

assert

The keyword in a Java assertion statement used to indicate a condition thatshould be true in order for the code to be correct, particularly used inprivate methods.

assertion

A statement in the Java language that enables you to test your assumptionsabout your program; a condition that a programmer believes should be true.

assignment

Assignment is the process that results in the variable on the left-hand side ofthe assignment operator receiving a copy of the value on the right-hand sideof the assignment operator. The value may be a primitive value or a referenceto an object. If the right-hand side of the assignment operator is anexpression, it is evaluated first.

assignment operator

An operator (=) used to assign a value to a variable in an assignmentstatement.

assignment statement

A statement that assigns a particular value to a variable

attribute

Some property or characteristic of an object that can be accessed using agetter method. Attributes are generally implemented by instance variables.Examples of such attributes are position and colour for Frog objects, andbalance and holder for Account objects.

attribute value

The current value of an attribute, often the same as an instance variable value,but possibly computed using instance variables.

auto-boxing

This is the automatic process of wrapping primitive values when called for bythe context of usage in a Java program.

auto-unboxing

This is the automatic process of unwrapping primitive values when called forby the context of usage in a Java program.

automatic type conversion

Where the Java compiler converts a value of some type to another typewithout the need for any explicit conversion of type on the part of theprogrammer. Automatic type conversion occurs in certain contexts, such as inan assignment statement when a compatible type on the right-hand side of theCombined glossary: Units 1–124assignment is converted to the type of the variable on the left-hand side of theassignment.

behaviour

A term used to describe the way in which an object behaves in response tothe messages in its protocol.

binary digit

Either of the two digits 0 and 1 in the binary number system. Binary digitsare used for the internal representation of numbers, characters and instructions.The binary digit is the smallest unit of storage.

binary operator

An operator that has two operands

bit

An abbreviation of binary digit

body

Another word for a statement block; for example, the body of a while loop isa statement block.

Boolean condition

A Boolean expression used to control the conditional execution of a statementblock.

Boolean expression

An expression that evaluates to either true or false.

Boolean operator

An operator used to combine simple Boolean expressions to form morecomplex Boolean expressions, which in turn can be combined with otherBoolean expressions. They are also known as logical operators.

bucket

A data structure that can contain zero or more unsorted elements. A HashSetuses buckets to implement a set. The hash code of each incoming element isused to decide which bucket to store it in.

buffer

Could refer to either an area used for temporary storage as data is transferredbetween a data source and a data sink, or a sequence of unfilled componentsthat allows a StringBuilder object to grow

bug

The cause of a run-time error

bulk operations

Operations that act on an entire collection without requiring the programmerto focus on individual elements.

bytecode

Bytecode is the intermediate code produced by the Java compiler. In BlueJ,compilation is done when the Compile button is pressed. This will create a bytecode file, for example, Frog.class, from the source code fileFrog.java. The bytecode file is portable because each computer that can runJava programs has a Java Virtual Machine that understands bytecode andconverts it into the machine code required for that particular computer.Bytecode is so-called because its instructions are a byte in size.

call stack

A representation of the order of methods called at some point during theexecution of a program, shown as a stack of method names, with the firstcalled method on the bottom and the last called method on the top.

capacity

The number of characters a StringBuilder object can hold.

casting

The prefixing of a value with the name of a type in parentheses in order toconvert a copy of that value into a different type. For example, (int) 99.0casts the value 99.0 into an int value

catch

The process of catching an exception, and the keyword introducing the clausein a try-catch statement that handles an exception.

chaining

Constructors are said to be chained, meaning that when an object is created,the constructors of all its superclasses are also called, either explicitly orimplicitly.

checked exception

An exception that the compiler requires the programmer to explicitly handleor declare may be thrown in a method header using a throws clause. Theseexceptions are ones that a programmer may reasonably be expected to catch orshould be made aware of.

class

A class is like a blueprint for the creation of objects and ensures that all itsinstances have the same instance variables and behave in response tomessages in an identical manner.

class header

The line in a class definition which gives its access modifier, name and,optionally, the name of a class it extends and the name(s) of any interface(s) itimplements. Example usage:public class WeatherFrog extends Frog implementsWeatherClient

class method

A class method is a method declared with the keyword static and isassociated with a class rather than with any of its instances. Classes are notobjects so code in a class method cannot use the expression this or thekeyword super. Class methods are invoked directly on the name of the class,using static binding, and so do not exhibit polymorphism.

class variable

A class variable is a variable declared with the keyword static. A classvariable is associated with a class rather than with any of its instances,although each instance of a class can access its own class’s class variables. Aclass only ever has one copy of each of its class variables. See qualified fordetails of how class variables are accessed.

client (class)

In programming, an object that uses a service provided by some other (server)class.

collaboration

The achievement of a software solution using two or more communicatingobjects.

collection

A collection consists of a number of, possibly zero, objects (strictly objectreferences) or primitives. The objects or primitives within a collection arereferred to as elements.

Collection Classes/collection classes

A set of library classes used to create various kinds of collection such as treestructures and queues. When capitalised, this phrase usually refers to classesthat are part of Java’s Collections Framework, which excludes array types.When used in lower case, the same phrase generally means any class thatimplements a collection (in the looser English language sense), which includesarray types.

Collections Framework

The Collections Framework includes a set of collection interfaces(Collection, Set, List, Map, and others), a set of collection classes(e.g. HashSet and HashMap) that implement them, and some supportingutility classes (e.g. Collections). The framework also includes a set ofassociated recommendations about constructors and about expected behavioursin common. Arrays are not part of the Collections Framework.

comma-delimited file

A file whose items of data (tokens) are separated by commas

comment

A comment is a piece of text in program code to assist human readers inunderstanding the code, and which the compiler ignores. In Java multi-linecomments are delimited by /* and */. End-of-line comments begin with twoforward slashes (//) and continue to the end of the line on which they begin.Javadoc comments are placed between the symbols /** and */ and mustappear immediately before a method, constructor or class header.

common message protocol

A set of messages shared by a number of classes. Often used to describe theset of messages specified by an abstract class for its concrete subclasses

Comparable

An interface that allows an element type to be sorted. It contains a singlemethod: compareTo().

compareTo()

The sole method of the Comparable interface. Allows classes of objectsimplementing this interface to be sorted (i.e. gives them a natural ordering).

comparison operators

A set of operators used for comparing values of expressions, including ==, >and < .

compilation error

An error detected by a compiler when code is compiled (which is known ascompile-time). No bytecode is generated if there are compilation errors.

compiler

Software which checks that text written in a high-level language is correctlyformed and, as far as can be determined before compilation, that it ismeaningful source code for the language

component (of an array)

The memory location at which an element (or a reference to it) of an array isstored.

component type

The type of the components of an array object; this determines the types ofthe object or primitive value that can be stored in the array.

compound expression

An expression built up using other sub-expressions, for example, thefollowing is a compound expression: (3 + 2) * (6 - 3).

concatenation

The joining of two strings. In Java the string concatenation operator is + (theplus sign). For example, "Milton " + "Keynes" evaluates to "MiltonKeynes".

concrete class

A class which is not abstract; a class for which instances can be created.

conditional selection

The use of if statements to select and execute alternative statement blocksbased upon the value of a Boolean condition.

constant

A constant is a variable whose value is fixed and unchangeable. Normally thekeyword final is used to make a value into a constant. In addition, whereonly a single value is needed for a class, constants are typically declared asstatic. However, static is not always used for constants, as sometimes a situation needs to be modelled where each instance of a class has its owndifferent constant value, such as a serial number.

constant instance variable

Constants are usually declared as final static variables. However,sometimes it makes more sense to define a constant as a final instancevariable. See constant for more information.

constructor

A programming construct, similar to a method, used to initialise a newlycreated object.

constructor chaining

The process whereby constructors use super() to invoke constructors higherup their inheritance hierarchy

convention

A commonly followed rule for implementing some feature of a softwaresystem that is not enforced by the language used, compiler, or platform onwhich the software is used

data field

A term encompassing instance variables and class variables as well asconstants

data hiding

The use of access modifiers to restrict access to class members, particularlyinstance variables, so that an object becomes a ‘black box’, with access to theencapsulated data (the instance variables) being possible only through alimited set of public methods.

debugging

The identification and removal of errors (bugs) from a program.

declaration

A statement in which memory is reserved for a variable of some type that isformed by writing the type of the variable followed by some name (itsidentifier).

default constructor

A zero-argument constructor that simply invokes super(). This constructor isprovided automatically by the compiler when the programmer has notspecified any constructor in a class.

default values

The values used by default to initialise instance variables of a class, whichmay be overwritten by another, explicit, initialisation.

defensive programming

A programming technique in which a method provides alternative paths todeal with expected and unexpected arguments. The method may return aBoolean to indicate success or failure, or (when necessary) use an exceptionto signal a failure

delimiter

A character used to mark where some part of a program starts or ends. Forexample, in Java, the character ; marks the end of a statement and thecharacter { marks the beginning of a statement block.

design by contract (DbC)

A programming technique in which a specification states a precondition forthe correct use of a method, and a postcondition that the method will achievein the event that its precondition is met. An exception is thrown by a methodwhen its precondition is not met.

design principle

In contrast to a guideline or suggestion, the word principle is reserved forrecommendations that apply universally or nearly universally. In this module,the term design principle is applied to principles governing how code shouldbe organised. The authors reserve the right sometimes to violate designprinciples for teaching reasons!

destructive operation

An operation on a collection that changes the contents of the collection insome way is said to be destructive. You may need to examine the Java API todetermine whether a method is destructive or non-destructive

dialogue box

A type of window with buttons through which users can be given informationby a program or provide information to a program on request. In M250,dialogue boxes are provided by class methods of the OUDialog class

diamond operator

From Java 7 onwards the diamond operator, written <> , simplifies theconstruction of collection objects. The compiler uses type inference todetermine the appropriate type of the collection based on the type of thecollection’s reference variable.

difference

For sets, the difference of A and B is all the elements in A that are not in B.This result is usually different from the difference of B and A. The term isused to refer both to the result and to the operation

direct access (of an instance variable)

Accessing an instance variable using its name, rather than using a gettermethod.

direct interaction

Direct interaction is not a formal technical term, but a descriptive phrase usedto describe a situation where one object has a reference to another, and thisreference is used to affect the state or behaviour of the other object. Contrastwith indirect interaction.

direct subclass

A class is a direct subclass of another class if it is directly below that class inthe class hierarchy

dynamic binding

The postponing of what method to select for execution in response to amessage until run-time. The method selected depends on the class of objectthat receives the corresponding message, rather than on the type of thevariable that references it

dynamic compilation

A compilation technique (used by the Java environment) generating realmachine code from bytecode (intermediate code). A chunk of bytecode iscompiled into machine code just prior to being executed. (This is differentfrom, and faster than, the piecemeal operation of an interpreter.) The realmachine code is retained so that subsequent execution of that chunk ofbytecode does not require the translation to be repeated.

effective length

The number of meaningful elements that a fixed-size collection actually holds.

element

The name given to the primitive value stored in, or the object referenced by,an array component

encapsulation

Encapsulation is the parcelling up of information and behaviour into areusable component. Objects allow you to encapsulate data by incorporatinginto a single entity (the object) both the data (instance variables) and thebehaviour (methods) defined for that data.

entry

An entry in a map means a key–value pair; that is, it refers to the combinationof a key and its associated value.

equals()

A method that determines whether two objects are equal or not. Since it isimplemented by the class Object, all classes of object understand themessage equals(), but the method is overridden to define versions ofequality appropriate to particular classes. For many classes, such as String,the method equals() is defined effectively to mean ‘has the same state as’.More generally, equals() is coded to mean ‘should be regarded as equal forour purposes’.

escape character

A character used to mark the start of an escape sequence in a string. In Javathis is the \ (backslash) character.

escape sequence

A sequence of characters beginning with a special escape character, such as abackslash, that allows subsequent characters to take on a different meaning forthe compiler.

evaluate

To find the value of something. We say that expressions have a value orevaluate to some value

exception

An object that is thrown by a method or the JVM as the result of a run-timeerror. The exception object holds details of what went wrong, allowing theexception handler that catches the exception to take appropriate action, orprovide a useful error message to the programmer.

exception handler

A block of code written to deal with (handle) an error that has been signalledwithin some program code. In Java, the error must have arisen in the contextof a try block, and the exception handler is in an associated catch block.The try and catch together make up a single statement.

exception handling

The programmed catching of an exception and the subsequent execution ofcode to abandon or continue execution, or to restore the software to ameaningful state.

expression

Code that evaluates to a single value. Expressions can be formed from literals,variables, operators and messages

failing fast

The programming philosophy which recommends that errors be signalled assoon as possible so that their cause can be more easily traced, and so thaterrors are not allowed to be passed on to other parts of a software system,potentially causing problems later. In Java this is done by throwing anexception.

File

An instance of this class contains the pathname to a file or folder in a systemindependentformat. The file specified need not exist; instead the pathnamemay point to a potential new file or folder.

final

The keyword final prevents a variable from ever having its value reassignedonce it has an initial value.

finally

Java keyword that introduces a block of code in a try-catch statement that willalways be executed, regardless of whether an exception occurs or not

fixed-size collection

A collection whose number of elements is fixed on creation. Such a collectioncan neither grow nor shrink.

floating-point type

A type capable of representing a decimal number (to a restricted level ofaccuracy).

flushing

The process of emptying a buffer so that no data remains in it, the data beingtransferred to a sink.

for statement

A statement allowing a statement block to be repeatedly executed according tothe value of a loop control variable (typically of type int) and a Booleancondition whose value is dependent on the loop control variable. for loopsare typically used when a fixed number of iterations is required. See alsowhile loop.

for-each statement

A statement that enables iteration through every element of a collection

formal argument

A typed identifier used in a method signature between parentheses to stand fora value (an actual argument) that is passed into the method body by amessage.

formatting guidelines

A set of guidelines which specify how program code should be laid out.

garbage collection

The process of destroying objects that have become unreachable because theyare no longer referenced by variables, in order to reclaim their space inmemory. In certain programming languages, including Java, this process isautomatic.

generics

A programming language feature that allows the writing of code that supportsmany types, but allows a particular type to be specified, so allowing for moretype checking to take place. Java collections from Java 5 onwards supportgenerics. When creating such a collection an element type is specified

getter message

A message that returns as its message answer the value of one of thereceiver’s attributes.

getter method

A method whose purpose is to return the value of one of an object’s attributesas its message answer. For example, the method getPosition() is a gettermethod that returns the value of the instance variable position held byinstances of the Frog class.

graphical representation

A visible representation of a software object that, by definition, is invisible.

hash code

In Java, a hash code is an int that can be calculated for any object, bysending it the message hashCode(). This method is inherited from Object,but in general must be overridden if equals() has been overridden. Hashcodes are used by sets and related collections to allow them to store elementsefficiently and to check rapidly for duplicates. If a class redefines equals(),then the hashCode() method for that class must take the definition intoaccount; otherwise the type will not behave properly in collections

helper method

A method whose purpose is to do some internal work of an object and whichtherefore should have private access so that it cannot be used by objects ofother classes

hiding

The situation in which a superclass member is not directly accessible in asubclass due to the subclass defining a member with the same name (for avariable) or same signature (for a method).

high-level language

A language (for example, Java) whose structure reflects the requirements ofthe problem, rather than the facilities actually provided by the hardware. Itenables a software solution to a problem, or a simulation of an aspect ofreality, to be expressed in a hardware-independent manner

homogeneous collection

A collection in which all the elements are of the same type. All collections inJava are homogeneous

identifier

The name given to a variable, method or formal argument.

identity

Identity refers to an object rather than its state. Two reference variables havethe same identity if they both reference the same object; that is, if they bothcontain a copy of the same reference value

if statement

A programming construct whereby one or more statement blocks areconditionally executed, according to whether a Boolean condition evaluates totrue or false.

immutable

An object whose state cannot be changed. An object whose state can bechanged is said to be mutable.

implement

In software development, to write the program code for some task orspecification. We also say that a class implements an interface when itimplements the interface and is able to understand all the messages specifiedby the method signatures of the interface

implementation class

A class that implements an interface, also known as an implementing class.For example, in the context of collections, ArrayList is an implementationclass for the List interface, it is an implementing class of List.

implements

A keyword in Java used in a class header to specify that the class implementsa particular interface. Example usage:public class SomeClass implements SomeInterface

index

An integer that is used to access the elements of an indexable collection.

indexable collection

A collection in which every element is accessed by an index

indirect interaction

Indirect interaction is not a formal technical term, but a descriptive phraseused to describe a situation where one object affects the state or behaviour ofthe other object, but without actually having a reference to that object –i.e. some intermediary object is used. Contrast with direct interaction.

indirect subclass

A class is an indirect subclass of another class if it inherits from that class viaone or more intermediate classes

indirect superclass

A class is an indirect superclass of another class, if it is above that class in theclass hierarchy but not directly above it.

inheritance

A relationship between classes by which they are organised into a hierarchy.According to the Java Language Specification (JLS), classes lower in ahierarchy are said to inherit all the accessible members from classes higher inthe hierarchy, other than those they override or hide. However, in generalobject-oriented terms, an object of class T is said to inherit all the members ofthe superclasses of T.

InputStream

The base class of a hierarchy of classes including FileInputStream,BufferedInputStream and ObjectInputStream, which are used to read(8-bit) byte streams. InputStream classes are used to read binary data

inspector

An inspector is a tool used in M250 to look at the value held (or objectreferenced) by a variable declared in the OUWorkspace. In the case of avariable referencing an object an inspector will show the internal state of thatobject, listing its attributes and their current values.

instance

An object that belongs to a given class is described as an instance of thatclass.

instance method

Code that is executed as the result of a message being sent to an object.

instance variable

A variable whose identifier and type is common to all the instances of a class,but whose value is specific to each instance. Each instance variable eithercontains a reference to an object or contains a value of some primitive type.For example, Frog objects have the instance variables colour andposition. The values of the instance variables of a particular objectrepresent the state of that object

integrated development environment (IDE)

A software tool that supports the development, compilation and execution ofcomputer programs. BlueJ is an example of an IDE that supports thedevelopment of programs in Java.

interface

(Java specific) An interface specifies a list of messages that a group ofunrelated classes, which are said to implement the interface, must be able toreceive. An interface lists only method headers (no method code), cannotdeclare any instance variables and cannot be instantiated. Classesimplementing an interface must be able to receive all the messagescorresponding to methods specified by that interface, either by defining therequired methods or inheriting them.

interpreter

A program that translates statements (rather than translating a whole program)from a high-level language, such as Java, to a machine code language, andexecutes the machine code.

intersection

Intersection is a mathematical operation on two or more sets that results in aset containing only the elements common to both sets. The term is used torefer both to the result and to the operation.

invocation

Executing code in a method. Class (static) methods are invoked directly ona class, whereas instance methods are invoked by sending messages toobjects. Also called method invocation

iteration

Also referred to as repetition. The repeated execution of a statement block foras long as some Boolean condition evaluates to true. Examples ofprogramming constructs in Java that support iteration are while and forloops.

Java edition

A category of Java targeted at a particular platform or domain, such asdesktop systems or mobile devices.

Java Language Specification (JLS)

The document that specifies the terminology used by the Java language anddescribes the manner in which various parts of the language work.

Java Runtime Environment (JRE)

The Java Runtime Environment (JRE) consists of the virtual machine (JVM)plus additional software, such as class libraries, that are needed to support therunning of Java programs on different platforms

Java version

A release of an edition of Java.

java.util.Arrays

A Java utility class that contains static methods for manipulating arrays

Javadoc

A programming tool that comes with Java. The Javadoc tool picks upinformation from specially formatted comments and other parts of the classcode such as the constructor and the method headers. These are all used tocreate an HTML file, which describes the class in a standard way. Thisdescription is aimed not at the Java compiler, but at human readers

key

A key is a value that can be used to uniquely identify any object from a givenmap-based collection. What constitutes a good key may depend on thepurpose of the collection.

key set

The set of all the key values for all the entries in some map. A key set istypically used to iterate over a map-based collection.

key–value pair

Maps can be viewed as a set of key–value pairs. Each entry in a map is akey–value pair. For example, a key might be a person’s name, and itsassociated value their telephone number

keyword

A Java keyword is a word reserved for use in the language. Keywords cannotbe used as variable identifiers

lazy evaluation

A type of evaluation used in compound Boolean expressions involving the &&and || operators whereby the second operand is evaluated only when it is necessary to do so in order to determine the truth value of the wholeexpression.

length

The number of elements an array can hold.

list

An ordered collection of variable size that permits duplicate elements

literal

A textual representation of a primitive value or object. For example, 'X' is achar literal, 4.237 is a double literal and "hello there!" is a Stringliteral.

local variables

A variable that is declared inside a statement block, such as inside a methodbody, or for statement, or, in the case of M250, the OUWorkspace. Thescope of such a variable is restricted to the statement block in which it isdeclared.

logical error

An error in logic, such as iterating for an incorrect number of times, orindexing an array at an incorrect position. Such an error may, or may not, leadto a program crash. Such errors may be detected while writing source code orduring the running of a program, or not at all

logical operator

An operator whose operands are Boolean values and which evaluates to aBoolean value; for example, the operator &&.

loop

In programming, a loop is a sequence of statements that is continuallyrepeated until some Boolean condition is reached.

loop control variable

A variable used to regulate the number of times a loop such as a forstatement or while statement is executed; such a variable is typically declaredinside a for loop’s header or before a while loop.

low-level language

A language written for direct programming of a computer's hardware. Eachtype of computer hardware needs its own low-level language.

maintainability

This is the extent to which a program can easily be maintained over a periodof time during which the requirements for the software may change.

map

A collection type that relates a set of keys to their corresponding values.

mapping

Another name for a key–value pair

member

The term member is a convenient word sometimes used to cover all of thefour following categories: class variables, class methods, instance variables and instance methods. Constructors are not members. Members are involvedin inheritance.

message

A message is a request for an object to do something. The only way to makean object do something is to send it a message. For example, the position of aFrog object changes when it is sent the message left() or right(); toobtain information on the value of a Frog object’s colour attribute, you sendit the message getColour().

message answer

When a message is sent to an object, then, depending on what the message is,a message answer may be returned. A message answer is a value or an object;it is not a message. Sometimes a message answer is used, sometimes it isignored. A message answer may be used subsequently as the receiver orargument of another message. Getter messages return the value of an attribute,as with the message getColour(), which returns a value such asOUColour.GREEN.

message expression

A message-send that evaluates to some value, i.e. the message returns amessage answer. We also say that it returns a value.

message name

The name of a message, including the following parentheses, but excludingany arguments. For example, the name of the message left() is left(),and the name of the message upBy(6) is upBy().

message-send

The code that sends a message to an object – for example, frog1.right(),which consists of the receiver followed by a full stop and then the message.

method

The code that is invoked by the Java Virtual Machine at run-time when anobject receives a message.

method body

That part of a method enclosed by braces that follows the method header. Thebody of a method is an example of a statement block.

method header

A method header consists of an access modifier (e.g. public), a return value(e.g. int or void) and a name (e.g. setPosition) followed by anyformal argument names enclosed in parentheses (e.g. (int aNumber)). Forexample, the method header for the method of the class Frog whose name issetPosition() is public void setPosition(int aNumber).

method invocation

At run-time, selecting and executing a method when an object receives amessage.

method signature

The name of the method together with the parentheses and the types of anyarguments. For example, the signature for the setPosition() method in theFrog class is setPosition(int).

microworld

A computer-based simulation with opportunities for manipulation of contentand practice of skills

modal (dialogue box)

A dialogue box that will not allow you to interact with another part of theprogram until you have responded to it by clicking one of the buttonspresented. All the dialogue boxes provided by the class OUDialog are modaldialogue boxes.

model (verb)

To simulate an entity in the problem domain using software

mutator message

Another name for a setter message

mutator method

Another name for a setter method

natural ordering

In Java, an element type is said to have a natural ordering if it implements theinterface Comparable and consequently has a compareTo()method. Fornumbers and strings, the natural ordering corresponds simply to everydaynumerical order and alphabetical order.

new

A keyword used to create an object – used in conjunction with a constructor

non-destructive operation

An operation on a collection that does not change the contents in any way

object

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

Object

The top-level class in Java. Every class in Java other than Object is either adirect or an indirect subclass of Object.

object diagram

An object diagram represents an object. It shows the class of the object, itsstate in terms of attribute values, and its protocol.

object initialisation

The state of an object when it is first created depends on its initialisation, aprocess whereby its instance variables are set to known values. Thisinitialisation is usually carried out by the constructor in the object’s class

object technology

A synonym for object-oriented technology

object-oriented programming

An approach to programming in which a software problem is modelled usingclasses of objects that can achieve a solution by sending messages to oneanother

object-oriented technology

The technology associated with viewing software as being made up of objects

operand

An expression provided to an operator. A binary operator such as + has a lefthandoperand and a right-hand operand

operating system (OS)

The software that manages the resources of a computer, including controllingthe input and output, allocating system resources, managing storage space,maintaining security and detecting equipment failure.

operator

A symbol used as a function, that is, it has one or more values it operates onand returns a value

orchestrating instance

An orchestrating instance is a separate object used to tie together the differentparts of a complicated interaction that do not seem to belong to any single oneof the objects involved

ordered collection

A collection where each element in the collection has a well-defined place, asindicated by its index number. Thus, an ordered collection allows us to accessand find the first, second or last element etc. However, the order does nothave to reflect anything to do with the elements themselves. It is simplydetermined by where each element has been placed in the list. This contrastswith a sorted collection

OutputStream

The base class of a hierarchy of classes including FileOutputStream,BufferedOutputStream and ObjectOutputStream, which are used towrite (8-bit) byte streams. OutputStream classes are used to write binarydata.

overloading

A method is said to be overloaded when there are other methods, defined inthe same class, or inherited (in the JLS sense) from some superclass, with thesame name but a different method signature, i.e. different types and/ornumbers of arguments.

@Override

A Java annotation used to indicate that a method is intended to override aninherited method

overriding

The process of redefining (replacing) a method that would have been inherited(JLS definition) from a superclass so as to cause it to have different behaviour.A method that overrides a method from a superclass has the same signatureand return type as the superclass method.

parameter

A synonym for argument

pathname

A textual representation of how to find a file or folder on a particularoperating system

peripheral device

Any part of the computer that is not part of the essential computer (i.e. theCPU and main memory), such as a mouse, keyboard or flash drive.

persistence

The ability of objects or other data to continue in existence after a programhas stopped executing.

persistent

Stored in a non-volatile form, that is, a form that is not lost when thecomputer's power is turned off. The most common form of persistent storageis a file on a disk drive.

polymorphic method

A method with the same signature as some other method, but which typicallydefines different behaviour. For example the method home() defines differentbehaviour for Frog, Toad and HoverFrog objects. In Java, polymorphismoccurs when classes in inheritance hierarchies override methods as well aswhen several classes implement some interface

postcondition

A condition that is true after some code (particularly a method) is executed

postfix operator

An operator that appears after its operand(s).

precedence rules

Rules for determining the order in which various operators are evaluated in acomplex expression

precondition

A condition that must be true before some code is executed in order for thatcode to behave correctly. The user of a method typically checks itsprecondition before using it

primary sort

An initial sorting according to a particular key

primitive data type

A set of values together with operations that can be performed on them. Theprimitive data types in Java provide a set of basic building blocks from whichall of the more complex types of data can be built. Java’s primitive data typesinclude int, char and boolean.

primitive type variable

A variable declared to hold a value of the declared or compatible primitivedata type. Less formally we refer to a primitive variable

primitive value

A value of some primitive type; for example, true, -1.3, 42, or 'x' are allprimitive values of different primitive types

private

An access modifier that restricts access to a class member to objects of theclass to which it belongs

private protocol

The part of the protocol of a class or object that is inaccessible from a contextoutside of the class itself

problem domain

The collection of real-world entities within the application area that exhibit thebehaviours that the required system has to model.

procedural programming

An approach to programming in which a problem is broken down intosmaller, simpler procedures, often incorporating global data structures

program

A software solution to a problem, typically on a small scale (compared tolarger application software).

protected

Java access modifier used to restrict access of a member of a class X tosubclasses of X and classes within the same package as class X.

protocol

The set of messages an object understands

public

An access modifier applied to a class member that allows all classes of objectsto have access

public protocol

The part of the protocol of a class or object that is accessible from outside ofthe class itself.

qualified

The qualified name of a member is its simple name prefixed by the name ofits enclosing class, as in OUDialog.request. The parts of such names areseparated by dots. This means that different classes can have members withthe same names – the qualified names allow them to be distinguished fromone another

raw collection

A collection for which an element type is not specified. Java collections priorto Java 5 are raw collections and contain only references of class Object

Reader

The base class of a group of classes including FileReader andBufferedReader, which are used to read 16-bit character streams. Readerclasses are used to read text files

receiver

The object to which a message is sent.

recursive method

A method that calls itself as part of its method definition. This can lead toindefinite looping when an attempt is made to execute the method. However,used properly, it can be an extremely powerful approach.

refactoring

Refactoring is when code is rewritten without changing its overall effect, butfor the purpose of improving its design, removing code duplication, orimproving maintainability.

reference type variable

A variable declared to hold a reference to an object of the declared type (or acompatible type). Less formally we refer to a reference variable

relative pathname

A path to a file beginning from the current working directory, often resultingin a shorter path than an absolute path.

return type

The type of value returned by a method.

run-time

The period during which a program is executing, in contrast to the time periodduring which it is loaded or compiled.

run-time error

A programming error that becomes apparent only when the program is run,and has not been detected beforehand. Run-time errors can be caused bylogical errors, failure to account for different ways in which code might beused, or conditions outside of the control of the programmer.

Scanner

A class used to read string tokens from a source. In M250 the source may bea FileReader or a String.

scope

The scope of a variable describes the areas of program code from which thevariable may be used. The scope of a local variable is from the point where itis declared to the end of its enclosing statement block.

secondary sort

A sorting that can be applied after applying a primary sort in order to sort anyelements that are considered equal by the primary sort

selection

A technique by which a statement or statement block is executed subject tosome Boolean condition. An if statement is used to perform selection inJava.

self-documenting code

Code written using well-chosen names and structures so as to make itsintentions relatively clear when read

sequence diagram

A diagram that depicts the interactions required between objects to carry out aparticular task; this collaboration is shown in the form of messages andmessage answers.

set

A collection in which each item may appear only once – no duplicates areallowed.

setter message

A message that sets the value of one of a receiver’s attributes. See also gettermessage

setter method

A method whose purpose is to assign a new value to an instance variable. Forexample, the method setPosition() is a setter method for the instancevariable position held by instances of the Frog class.

software

A general term for all programs that can be run on a desktop computer oranother hardware platform, such as a mobile phone

software component

A piece of software that can be readily combined with other components toconstruct more complex software.

sorted collection

A collection that always keeps its elements in their natural ordering, if any.This contrasts with an ordered collection, where the ordering may just be anaccident of where elements happen to have been placed in the collection

source code

Program text expressed in a high-level programming language.

stable sort

A sort that does not reorder equal elements

stack trace

A stack of textual information ordered from the last thing that happened downto the first thing that happened that is displayed when an exception is thrownand not handled; a representation of a call stack.

state

The values of the attributes of an object constitute its state. The state of anobject can vary over time as the values of its attributes change.

statement

A statement represents a single instruction for the compiler to translate intobytecode. In Java most statements end with a semicolon.

statement block

A statement or sequence of statements ‘bundled together’ for use in aparticular context. Any sequence of statements can be turned into a block byenclosing it in braces (curly brackets).

static

A Java keyword that defines a variable or method as belonging to a classrather than its instances

static binding

The selection by the compiler at compile time (rather than a virtual machine atrun-time) of a method to be executed at run-time. In the case of classmethods, the compiler chooses the method from the class whose name is usedto qualify the method name, or based on the type of the reference variable. Incomparison, instance methods can be selected for execution at run-time basedon the type of the receiver object.

stream

An object used to connect a data source to a data sink, enabling data to betransferred from the source to the sink.

string

A sequence of characters enclosed in quotation marks; an object of typeString

string interning

A process used by Java to create a pool of strings that can be reused whenpossible, which may result in the sharing of string literals.

StringBuilder

A class whose instances represent a mutable sequence of characters

strong typing

A programming language feature that requires variables to have a declaredtype and enforces rules on the ways in which those types can be used,including what types of values can be assigned to variables of those types andwhat operators values of those types can be used with. Languages (such asJava) that feature strong typing are said to be strongly typed

sub-array

A set of contiguous components within the same array.

subclass

A subclass is any class which extends (inherits from) another class. In Java allclasses except Object are subclasses of some other class

subclassing

Defining a class as a subclass of an existing class

subinterface

A subinterface is an interface that extends another interface (called itssuperinterface), thereby inheriting the signatures of the parent interface, andwhich typically contains additional method signatures

sublist

A list together with any two positions in the list may be seen as defining anew list containing just those elements between the two positions, retainingthe same order. The new list is known as a sublist.

substitutability

The principle in object-oriented programming whereby, wherever the systemexpects an object of type X, an object of class Y can always be substitutedinstead, where class Y is a subclass of X, or where class Y implements aninterface of type X.

substitution

The technique of providing an instance of one class in a situation where aninstance of a different class is expected. In Java, an object can be assigned toa variable whose type has been declared as some superclass of the object, orwhich has been declared as an interface type which that object’s classimplements. Similarly, an object can be used as an actual argument to amethod where the formal argument’s type has been declared as somesuperclass of the object, or which has been declared as an interface typewhich that object’s class implements

subtype

A type whose values (in the case of primitive types) or instances (in the caseof class types) are substitutable for another type’s values. For example, asubclass type is a subtype of a superclass type. A class that implements aninterface is a subtype of the interface type

super

A Java keyword that allows the writing of expressions to access members of aclass that are inaccessible using the expression this, due to hiding oroverriding; for example, super.x or super.x() causes the JVM to start itssearch for the corresponding member in the superclass of the receiver. Themember must be accessible for such code to compile

super()

Used within a constructor to invoke the constructor without any arguments inthe direct superclass. May also be used with n arguments to invoke asuperclass constructor with n formal arguments

superclass

If B is a subclass of A, then A is the superclass of B. In the Java programminglanguage a subclass has only one direct superclass

superinterface

A superinterface is an interface that is extended by some other interface(s).

supertype

A type that supports substitution of more specific types. Both interface typesand superclass types (including abstract class types) are examples ofsupertypes. See also subtype.

syntax

The syntax of a programming language is the set of rules governing thestructure of the language, including its valid symbols, expressions andstructures. Syntax rules define the form of the various constructs in thelanguage, but say nothing about the meaning of these constructs

syntax error

An error that occurs as a result of failure to observe a syntax rule. Such anerror is detected during compilation by a compiler

testing

The process of using test cases to check that code is behaving as theprogrammer intended, and to help discover bugs

this

An expression used within a method or constructor to reference the objectexecuting the method or constructor

this()

Used within a constructor to invoke the constructor without any arguments inthe current class. May also be used with n arguments to invoke a constructorwith n formal arguments in the current class.

throw

The process of throwing an exception, also referred to as raising or signallingan exception

throws clause

A part of a method header beginning with the keyword throws, followed bya comma-separated list of any exceptions the programmer wants to declare tobe thrown. If a checked exception is not handled, it must be declared in athrows clause.

token

An item of data that can be written to or retrieved from a file. Delimiters areused to separate tokens in a file.

tree

A collection structure typified by branching connections between elements,often used to create collections of items sorted according to some criteria

try-catch statement

An exception handling statement, a mechanism to catch exceptions. If apossible checked exception is not declared in a throws clause, it must behandled using a try-catch statement

unary operator

An operator that has just one operand; for example, the minus operator

unchecked exception

An exception for which the compiler does not require any explicit exceptionhandling code and that the compiler does not require the programmer todeclare as thrown in a method header. These are errors that may not be easilyrecovered from, or should not be recovered from; instead, program logic orother issues may need to be resolved

union

Union is a mathematical operation on two or more sets that results in a setcontaining all of the elements of all of the sets. The term is used to refer bothto the result and to the operation.

unwrapping

The process of converting a wrapped value (one contained in a wrapper class)to its primitive value equivalent

utility class

A utility class is one that provides methods (usually static) that performcommon functions. The Math class is an example.

variable

A named ‘chunk’ or block of the computer’s memory which can hold either avalue of some primitive type or a reference to an object

variable initialisation

The process of assigning a variable a value for the first time

variable reference diagram

A diagram showing the relationships between reference variables, objects andtheir instance variables. Object protocol is not included

virtual machine (VM)

A layer of software that simulates a computer capable of interpretingbytecode

visibility

Visibility of an item (such as a member or constructor) in a class refers towhether or not parts of a class can access that item directly. Same asaccessibility

void

A keyword used in Java to indicate that a method does not return a value

while statement

A loop that allows a statement block to be repeatedly executed depending onthe value of some Boolean condition. while loops are typically used to repeatcode when the number of iterations cannot be determined in advance. See alsofor loop

workspace variable

Workspace variables (such as in the OUWorkspace) behave like localvariables, except that their lifetime lasts until you close or reset theworkspace, rather than ending when a particular block has finished executing

wrapper class

Every primitive type has a corresponding wrapper class whose purpose is tohold a primitive value in a place where a primitive value is intuitively what isneeded, but where the type checking requires an object. For example, thewrapper class of int is Integer. Wrapper classes are used in auto-boxing

wrapping

The process of converting a primitive value to an object equivalent, using awrapper class

Writer

The base class of a group of classes including FileWriter andBufferedWriter, which are used to write 16-bit character streams. Writerclasses are used to write text files

zero-based indexing

An indexing system in which the first index is 0.