1/108
Computer Science
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Class
a template that defines the data and actions for objects
Object
an instance created from a class with its own data
Instantiation
the act of creating a specific object from a class
UML
a visual method for showing classes and how they connect
Public
an access level that allows use from any class
Private
an access level that blocks use outside the class
Protected
an access level that allows use in the class and its subclasses
Attribute
data stored inside an object
Method
an action an object is able to perform
Constructor
a method that sets up a new object
Accessor
a method that returns a variable value
Mutator
a method that updates a variable value
Signature
a method name and parameter list
Return value
the output given back after a method ends
Blueprint analogy
idea that a class acts like a design while objects are the built result
Memory usage
classes use no memory while objects use memory to store data and actions
Multiplicity
the number of object links shown in a UML association
Association
a basic link showing two classes are connected
Dependency
a uses link where one class relies on another to function
Aggregation
a whole and part link where the part belongs to one parent
Inheritance
a link where a child class extends a parent class
Polymorphism
the ability for one action name to behave differently for different objects
Static polymorphism
method choice decided by parameters at compile time
Dynamic polymorphism
method choice decided by the object at run time
Encapsulation
keeping data and actions together and controlling access to protect them
Need to reduce dependencies
reducing links between classes to improve reuse and flexibility
Primitive type
a basic built in type used to store simple data
Integer
a type used to store whole numbers
Real number
a type used to store numbers with fractional values
Boolean
a type that stores true or false
String
a sequence of characters stored as a reference type
Parameter
a variable used inside a method definition
Argument
the value passed into a method when the method is used
Local variable
a variable created inside a block of code
Extends
the keyword that creates inheritance
Static
a class level item shared across all objects of that class
Selection statement
a structure that makes decisions in code
If statement
a condition that runs code only when it is true
Else statement
a branch that runs when earlier conditions are not met
For loop
a loop used when the number of repeats is known
While loop
a loop that repeats while its condition stays true
Do while loop
a loop that always runs once before checking the condition
Array
a fixed size list of items of the same type
Index
the position of an item in an array starting at zero
Modularity
splitting a program into smaller sub programs
Programming team advantage
more people can handle larger tasks
Programming team disadvantage
more communication and coordination are needed
Internationalization
designing software so it can fit many languages and regions
Unicode
a standard that represents characters from many writing systems
Ethical obligation
duty of programmers to test secure and credit work correctly
Recursion
a technique where a method solves a task by calling itself with a smaller version of the task
Base case
the condition that stops a recursive call
Recursive step
the part of a recursive method that calls itself again
Factorial recursion
a recursive definition where n factorial is n times factorial of n minus one
Fibonacci recursion
a recursive definition where each term is the sum of the previous two terms
Euclidean GCD recursion
a process that keeps reducing two numbers until they match
Exponent recursion
a method defined by a to the power n equals a times a to the power n minus one
Object reference
a value that points to where an object is stored
This keyword
a reference to the current object
Class as datatype
using a class as the type for an attribute
Stack
a structure that follows last in first out
Push
adding an element to the top of a stack
Pop
removing the top element of a stack
Peek stack
viewing the top element without removing it
Queue
a structure that follows first in first out
Enqueue
adding an element to the back of a queue
Dequeue
removing the element at the front of a queue
Peek queue
viewing the front element without removing it
ADT list
a description of list actions without stating how they are coded
IsEmpty list
a check to see whether a list has no items
IsFull list
a check used in static lists to see if they cannot take more items
Size list
a method that returns how many items are stored
AddHead
adding an element to the start of a static list
AddTail
adding an element to the end of a static list
Remove index
deleting an element at a given position
Present list
displaying the contents of a list
Linked list
a structure made of nodes connected by pointers
Node
a unit that stores data and a link to the next unit
Head pointer
the reference to the first node in a linked list
Ordered list
a list where elements are stored in sorted form
Unordered list
a list where elements are stored without order
ArrayList
a dynamic array structure from the Java library
LinkedList
a dynamic structure using nodes from the Java library
Add index ArrayList
adding an element at a specific position in the list
Clear ArrayList
removing all elements from a list
Contains ArrayList
checking if an element is present in the list
IndexOf
returning the first position of a given element
LastIndexOf
returning the last position of a given element
Iterator
an object that moves through a collection
ListIterator
an iterator that can move forward and backward
AddFirst LinkedList
adding an element to the front of the list
Pop LinkedList
removing the first element of a LinkedList
Peek LinkedList
checking the first element without removing it
Get LinkedList
retrieving an element from a specific position
Library advantage testing
a benefit because library code is already tested
Library advantage reuse
a benefit because the same code can be used many times
Library advantage size
a benefit because programs stay shorter
Stack ADT feature
a structure that follows last in first out and produces errors if empty
Queue ADT feature
a structure that follows first in first out and produces errors if empty
Binary tree ADT
a structure of nodes each with a left and right child