click below
click below
Normal Size Small Size show me how
APCS Ch. 1 Vocab
Comprehensive vocabulary.
Term | Definition |
---|---|
Class | A programming unit that captures abstraction. |
State | Properties or attributes. Used to describe objects. |
Objects | An abstraction of a class that has state and behavior. |
Behavior | Perform-able tasks, methods. Used to describe objects. |
Class Heading | The line of code that names the class and defines its relationship, if any, to another class or interface(s). |
Instance | An object of a specified class type. |
Instance Variable | A variable that must be referenced through an instance of the class. These variables define the attributes of a particular instance and are private. |
Field | Another term for instance variable. |
Constant | A value that cannot be changed during program execution. Specified with the keyword final. |
Class Variable | A variable shared by all instances of a class. It is created with the keyword static. If changed in one instance of a class, it is changed in all class instances. |
Method | A task that an instance of a class can perform. |
Signature | The method heading. This defines the method as public, private, or protected; lists the method name; and specifies its parameters. |
Overloading | The idea that two or more methods (or constructors) may have the same name as long as they have different signatures. |
Visibility Modifier | Defines how a construct can be accessed. Usually applied to a method or variable. |
Public | Visible to all users of the class. |
Private | Invisible to all users of the class; visible only within the class itself. |
Protected | Visible only to the class and subclasses of the class. |
Constructor | A method whose task is to instantiate an object by initializing the instance variables. Constructors are named for their class and have no return type. |
Default | A value that will be used instead of a programmer-specified parameter. Often refers to a constructor that has no parameters. |
Accessor Method | A method that returns the value stored in an instance variable. |
Modifier Method | Also known as a mutator method. A method that changes the state of an object. Usually are void. |
Helper Method | Private method used within a class, usually used to avoid repetition of code or to break down a complicated task. |
Parameter | Required information passed to a method so that it may accomplish its task. |
Formal Parameters | Parameters listed in the method signature. |
Actual Parameters | Values supplied by the client in the parameter list of a method call. |
Explicit Parameter | Information passed in the parameter list. |
Implicit Parameter | The object upon which the method is called. |
Local Variable | Variable declared within a method. |
Client | User of a class. |
Main Method | The method in which, in an application, where execution begins. |
Implementation | Code that defines a construct. |
Precondition | An assertion that specifies what must be true for a method to succeed in its task. Usually written in terms of parameters. |
Postcondition | An assertion that specifies what will be true when a method terminates. Usually written in terms of the return value or change in state. |
this | A keyword that refers to the implicit parameter. |