Looks like no one added any tags here yet for you.
Object oriented programming
Designing a program by discovering objects, their properties and their relationships.
Public interface
The features (methods, variables, and nested types) of a class that are accessible to all clients)
class
Describes a set of objects with the same behavior. For example, the String class describes the behavior of all strings. It is a programmer-defined data type.
Encapsulation
The hiding of implementation details
"Hello" and System.out
Example of an object
length, substring, and println
Examples of methods
String, Student, and PrintStream
Examples of classes
length and substring are methods of the String class
But println is not
The names and behavior of the methods of a class form the
public interface of the class
The user of a class only knows the public interface, not the implementation details, of a class.
This is called encapsulation.
behavior (of an object)
The actions taken by an object when its methods are invoked.
state
The current value of an object, which is determined by the cumulative action of all methods that were invoked on it.
instance variable
A variable defined in a class for which every object of the class has its own value.
modifier
A reserved word that indicates the accessibility of a feature, such as private or public.
type
A named set of values and the operations that can be carried out with them.
public interface
The features methods, variables, and nested types) of a class that are accessible to all clients.
accessor method
A method that accesses an object but does not change it.
instance variable
A variable defined in a class for which every object of the class has its own value.
explicit parameter
A parameter of a method other than the object on which the method is invoked.
constructor
A sequence of statements for initializing a newly instantiated object.
object reference
A value that denotes the location of an object in memory. In Java, a variable whose type is a class contains a reference to an object of that class.
static variable
A variable defined in a class that has only one value for the whole class, and which can be accessed and changed by any method of that class.
static method
A method with no implicit parameter.
package
A collection of related classes. The import statement is used to access one or more classes in a package.
inheritance
The is-a relationship between a more general superclass and a more specialized subclass.
superclass
A general class from which a more specialized class (a subclass) inherits.
subclass
A class that inherits variables and methods from a superclass but adds instance variables, adds methods, or redefines methods.
substitution principle
The principle that a subclass object can be used in place of any superclass object.
overriding
Redefining a method in a subclass.
overloading
Giving more than one meaning to a method name.
dynamic method lookup
Selecting a method to be invoked at run time. In Java, dynamic method lookup considers the class of the implicit parameter object to select the appropriate method.
polymorphism
Selecting a method among several methods that have the same name on the basis of the actual types of the implicit parameters.
hash code
A value that is computed by a hash function.
interface
A type with no instance variables, only abstract methods and constants.
implementing an interface
Implementing a class that defines all methods specified in the interface.
How to make a class comparable example
class Person implements Comparable<Person>{
Your constructor here and this.'s and the getters and setters then
@ Override
Public int compareto(Person other){
Return Integer.compare(this.age, other.age);
}
MVC
Model view controller
GUI
Graphical User Interface in which the user supplies inputs through graphical components such as buttons, menus, and text fields.
collection
A data structure that provides a mechanism for adding, removing, and locating elements.
set
An unordered collection that allows efficient addition, location, and removal of elements.
stack
A data structure with "last-in, first-out" retrieval. Elements can be added and removed only at one position, called the top of the stack.
queue
A collection of items with "first in, first out" retrieval.
priority queue
An abstract data type that enables efficient insertion of elements and efficient removal of the smallest element.
map
A data structure that keeps associations between key and value objects.
A grade book application stores a collection of quizzes. It should use a
List
A student information system stores a collection of student records. It should use a
set
A _____ is a better choice than a stack for organizing your required reading.
Queue
linked list (List<Integer> numbers = new LinkedList<>();)
A data structure that can hold an arbitrary number of objects, each of which is stored in a link object, which contains a pointer to the next link.
generic class
A class with one or more type parameters.
iterator
An object that can inspect all elements in a container such as a linked list.
doubly-linked list
A linked list in which each link has a reference to both its predecessor and successor links.
hash table
A data structure in which elements are mapped to array positions according to their hash function values.
binary search tree
A binary tree in which each subtree has the property that all left descendants are smaller than the value stored in the root, and all right descendants are larger.
Is a stack LIFO or FIFO
It is LIFO
Is a Queue LIFO or FIFO
It is FIFO
run-time stack
The data structure that stores the local variables of all called methods as a program runs.
priority queue
An abstract data type that enables efficient insertion of elements and efficient removal of the smallest element.
selection sort
A sorting algorithm in which the smallest element is repeatedly found and removed until no elements remain.
big-Oh notation
The notation g(n) = O(f(n)), which denotes that the function g grows at a rate that is bounded by the growth rate of the function f with respect to n. For example, 10n2 + 100n - 1000 = O(n2).
merge sort
A sorting algorithm that first sorts two halves of a data structure and then merges the sorted subarrays together.
linear search
Searching a container (such as an array or list) for an object by inspecting each element in turn.
sequential search
Searching a container (such as an array or list) for an object by inspecting each element in turn.
binary search
A fast algorithm for finding a value in a sorted array. It narrows the search down to half of the array in every step.
Array VS ArrayList
In summary, arrays are simpler and more efficient for fixed-size collections, while ArrayLists provide more flexibility and ease of use for dynamic collections. The choice between them depends on the specific requirements of your program.
What is a declaration?
they introduce something into the program and can be later referenced or used, it should have a type and a name
what are statements
things that end in a semi colon
benefits of using a static type?
-they help guide, catch and eliminate large classes early in development
- enable IDEs like IntelliJ, NetBeans, etc to provide more intelligent advice to programmers on the fly
- keeps compiler implementations simple
what are some primitive data types?
int, double, boolean, char
what is a class?
a blueprint or template for creating objects
what does the this reference variable do?
it is a reference variable that appears within the current class that but is in, it can be used to access files, methods etc
what do getter/accessor methods do
they allow users to retrieve data from the object
what is a setter /mutator method
they allow users to change/update/set fields of an object instance
what does the state of an object mean
the current values stored in an objects fileds