public
Allows access to data and methods from classes outside the declaring class.
private
Restricts access to data and methods to the declaring class.
Encapsulation
The process of hiding the implementation details of a class from the user
Accessor Methods
Methods used to access instance variable and object data. Also referred to as getter methods.
Mutator Methods
Methods used to change or manipulate instance variable or object data. Also referred to as setter methods.
alias
A variable that references an existing object. When the alias variable is manipulated, so is the original object, and vice versa.
“Has-a” Relationship
Objects are defined by having the attributes, or instance variables that they are assigned.
Preconditions
Conditions that must be true prior to execution in order for that code segment to behave as expected.
Postconditions
Conditions that must be true after the code segment is executed.
Accessor Method
A method that enables user to obtain information about an object’s instance and static variables.
toString Method
A specific accessor method that returns a String value with information about an object’s instance values. This overrides the object’s inherit toString method when an object is printed using System.out.print or System.out.println
Mutator Method
A method that enables user to change the value of an object’s instance and static variables.
object.instanceVariable
Instance variables can be accessed directly by using the reference variable name + . + the instance variable name. This only works within the class file if the instance variables are set to private.
Static Variables
Variables that can be accessed by all objects of a class. They are called using the class name, and can be used in static and non-static methods.
Static Methods
Methods that can be used directly by the class name. They cannot access instance variables or non-static methods.
Method Decomposition
The process of breaking down large problems into smaller problems, each with a method that defines a subproblem in the larger problem.
Shadowing
If two variables within the same scope have the same name, the variable with the more specific scope will be called.
Local Variable
A variable that is defined in a method or constructor. It only exists in the context of the method that it belongs to.
this Keyboard
Makes a call to the current object in a class file. Allows programmers to specify which objects and instance variables should be called.
ACM
Association for Computing Machinery: organization for computing professionals to provide guidance related to ethics and responsibilities.
System reliability
When all programs and code will work as intended.
Bias
Prejudice in favor of or against one thing, person, or group compared with another, usually in a way considered to be unfair.