1/154
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Object
A programming entity that contains state and behavior
State
Internal data of an object (fields or instance variables); what an object knows
Behavior
Set of actions performed by the object (instance methods); what an object can do
Class
A blueprint for an Object; defines how we construct and work with objects
Reference Semantics
Behavior where variables refer to a common value when assigned to each other or when passed as a parameter; object variables store the object's location in memory
Value Semantics
Behavior where variables store the actual value directly (used by primitives)
Null
A built-in value that does not refer to any object; uninitialized object variables are set to null
NullPointerException
Thrown when attempting to dereference null; null has no methods or data
Dereference
To access data or methods of an object using dot notation
Composition (has-a)
Creating a class from existing classes; classes have members (fields) that are instances of other classes
Delegation
A way of extending and reusing a class; an instance of the original class provides functionality for the class you're writing by calling methods on the field object
Abstraction
Distancing between ideas and details; can use objects without knowing how they work
Encapsulation
Hiding the implementation details of an object from the clients of the object; protects data from unwanted access
Class Invariant
A property that is true of every object/instance of a class; an assertion about an object's state that is true for the lifetime of that object
Cohesion
The extent to which the code for a class represents a single abstraction; degree to which the members of a class are related to the general purpose of the class
Coupling
A connection between two classes; a dependency between classes (instance of an object in the class, or calling another class to complete a task)
toString()
Called automatically whenever a String is concatenated with an Object; should be overridden to print interesting and relevant information
equals()
Called when wanting to compare objects; default behavior compares object references (same as ==)
hashCode()
A method that uses an algorithm to compute an unsigned integer value that is likely to be unique for different objects; must be compatible with equals()
Implicit Parameter
The object being referenced during the call of an instance method; accessed using the keyword this
Fault
An incorrect step, process, or data definition in a program
Testing
The dynamic verification of the behavior of a program on a finite set of test cases, suitably selected from the usually infinite executions domain, against the expected behavior
Verification
Process of evaluating a system or component to determine whether the products of a given development phase satisfy the conditions imposed at the start of that phase; are we building the product right?
Validation
Process of evaluating a system or component during or at the end of the development process to determine whether it satisfies specified requirements; are we building the right product?
Closed/Black Box Testing
Ignores the internals of the program; program treated as a closed or black box
Open/Glass Box Testing
Code under test is known; uses code to guide testing
Unit Testing
Testing of individual hardware or software units or groups of related units; focus on the method, interleaved methods, and class level
Integration Testing
Testing in which software components, hardware components, or both are combined and tested to evaluate the interaction between them; focus on the interaction between classes due to composition or inheritance
System/Functional Testing
Testing conducted on a complete, integrated system to evaluate the system compliance with its specified requirements
Acceptance Testing
Formal testing conducted to determine whether or not a system satisfies its acceptance criteria; enables the customer to determine whether or not to accept the system
Regression Testing
Selective retesting of a system or component to verify that modifications have not caused unintended effects and that the system or component still complies with its specified requirements
Beta Testing
3rd party testing by a subset of customers; unstructured/unscripted testing; closed box
Equivalence Class
A group of inputs/outputs that are expected to behave the same way; tests are written to include middle, representative input values from each of the possible classes
Boundary Value Analysis
Testing at the edges of equivalence classes; programmers tend to make mistakes at boundaries
Control Flow Diagram
A pictorial description of the flow of program control; diamonds represent decisions, rectangles represent program statements
Cyclomatic Complexity
A measure of a method's complexity; the number of potential paths through the source code; equals the number of decisions (diamonds) + 1
Basis Set Testing
Writing tests to cover all paths through a method using a control flow diagram
Requirements Coverage
Have all requirements been tested?
Method Coverage
Have all methods been called?
Statement Coverage
Have all statements in a method been executed?
Branch/Decision Coverage
Have all decisions been executed in both the true and false paths?
Condition Coverage
Have all conditionals been executed in both the true and false paths?
False Positive (Static Analysis)
The tool reports bugs the program doesn't contain
False Negative (Static Analysis)
The program contains bugs the tool doesn't report
Static Analysis
The process of evaluating a system or component based on its form, structure, content, or documentation; does not involve execution of the program
CheckStyle
Finds style issues with your code; places where code doesn't meet the departmental style guidelines
PMD
Finds style issues and potential bugs in your code
SpotBugs
Finds more serious problems with your code; programming projects require removal of alerts at the 'Scariest' and 'Scary' warning levels
Collection
An object that holds data; a data structure with state (elements) and behaviors (methods to add, remove, set, find elements)
List
An ordered collection of elements; elements are 0-indexed; has a size which is the number of elements in the list
ArrayList
A list where the elements are stored in an array; automatically grows to accommodate new elements
Generic Type
Specifies the type of elements that can be stored in the ArrayList; if no generic type is specified, the ArrayList stores Objects
Wrapper Class
A class whose purpose is to hold a primitive value and treat it as an object (e.g., int → Integer, double → Double)
IndexOutOfBoundsException
Thrown when accessing an invalid index; valid bounds are 0 to size-1 inclusive
Inheritance (is-a)
A programming technique in which a derived class extends the functionality of a base class, inheriting all of its state and behavior
Superclass
The parent class in an inheritance relationship
Subclass
The child class in an inheritance relationship; extends the superclass
Method Overriding
Providing your own implementation of a method to replace code that would otherwise have been inherited from a superclass; method name and signature must match exactly
Polymorphism
Legal for a variable of a superclass type to refer to an object of one of its subclasses; the object will behave like its actual type
Single Inheritance
In Java, a class can have only ONE superclass
super
A keyword that provides a reference to the behavior of the superclass; used to call superclass constructor or superclass version of overridden methods
Protected
A visibility modifier meaning the class, subclasses, and package members can see and use the member
instanceof
Tests if an object is an instance of a type
Abstract Class
A Java class that cannot be instantiated directly, but instead serves as a superclass to hold common code and declare abstract behavior
Abstract Method
Declared but not implemented; a behavior that you promise to implement when you extend the abstract class with a concrete class; ends in semicolon
Concrete Class
Has implementation or code for all methods; can be instantiated
Interface
A set of methods that classes promise to implement, allowing you to treat those classes as the interface type in your code; a contract that an implementing class MUST have the listed behaviors
implements
The keyword used for a class to implement an interface
Exception
An object representing an error or unusual condition
Checked Exception
An exception that must be handled by the caller for the program to compile; extend Exception
Unchecked Exception
An exception that does not have to be handled by the caller for the program to compile; extend RuntimeException
throws clause
Required on method header for checked exceptions; declares which checked exceptions a method may throw
throw
The keyword used to throw an exception
finally
A block of code that is guaranteed to execute if any code in the try block is executed, even if an exception occurs; used to clean up resources
Multi-catch
Java 1.7 and later; allows catching two specific exceptions that have common catch functionality using catch (ExceptionType1 | ExceptionType2 e)
Try-with-Resources
Java 1.7 and greater; declares one or more resources that must be closed; resource must implement AutoCloseable
Custom Exception
A user-defined exception created by extending Exception (checked) or RuntimeException (unchecked)
Library
A 3rd party collection of code that can be used in other programs; promotes code reuse
JAR file
A Java archive file containing compiled classes used as a library
Classpath (-cp)
The path(s) where Java looks for libraries when compiling and running a program
API (Application Programming Interface)
A series of webpages describing the public classes, interfaces, and methods of Java class libraries; describes what functionality is available; an example of abstraction
UML (Unified Modeling Language)
Models object-oriented software; convergence from three earlier modeling languages (OMT, OOSE, Booch)
Generalization (is-a)
A UML relationship showing inheritance; solid line with hollow arrow shows inheritance; dashed line shows a class implementing an interface
Association Connector
Indicated by a solid arrow line from the container (source) class to the contained (target) class; the association object isn't listed as a field in the container
Aggregation Connector
A stronger association (unidirectional); a white diamond at the end next to the aggregate class; the part can exist separate from the whole
Composition Connector
A stronger aggregation (unidirectional); a black diamond at the end next to the composite class; the part cannot exist separate from the whole
Model-View-Controller (MVC)
A design pattern that isolates business/domain logic from input and presentation; Model = data, View = UI, Controller = receives input and initiates response
Design Pattern
A description of communicating objects and classes that describes a problem which occurs over and over again and the core of the solution; found, not created
Singleton
A creational design pattern; ensures only one instance of a class exists
State Pattern
A behavioral design pattern; an object-oriented solution to a state-based application where an object's behavior depends on state and must change at runtime based on state
FSM (Finite State Machine)
An abstract model of a system (physical, biological, mechanical, electronic, or software); consists of inputs, states, and transitions; has initial and final states
State (FSM)
Represents the internal 'memory' of the system; stores information about what has happened before
Transition (FSM)
The response of the system to its environment (input); depends on current state and current input; often results in a change of state
Initial State (FSM)
The starting state of the finite state machine
Final State (FSM)
An accepting/ending state; represented by double circles
While-switch idiom
The standard code pattern for implementing text-processing FSMs; while loop gets each character, switch on the current state
Inner Class
A class defined inside of another class; only the outer class can see the inner class or make objects of it; inner objects can access/modify the fields of the outer object
Software Process
The development phases of software: Requirements/Analysis, Design, Implementation/Code, Testing, Integration, Deployment, Maintenance
Software Artifact
Any document, file, or tangible creation related to the software or its creation or maintenance
Waterfall Model
A plan-driven software process model where phases are completed sequentially with feedback arrows between phases