OOP 1&2

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/108

flashcard set

Earn XP

Description and Tags

Computer Science

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

109 Terms

1
New cards

Class

a template that defines the data and actions for objects

2
New cards

Object

an instance created from a class with its own data

3
New cards

Instantiation

the act of creating a specific object from a class

4
New cards

UML

a visual method for showing classes and how they connect

5
New cards

Public

an access level that allows use from any class

6
New cards

Private

an access level that blocks use outside the class

7
New cards

Protected

an access level that allows use in the class and its subclasses

8
New cards

Attribute

data stored inside an object

9
New cards

Method

an action an object is able to perform

10
New cards

Constructor

a method that sets up a new object

11
New cards

Accessor

a method that returns a variable value

12
New cards

Mutator

a method that updates a variable value

13
New cards

Signature

a method name and parameter list

14
New cards

Return value

the output given back after a method ends

15
New cards

Blueprint analogy

idea that a class acts like a design while objects are the built result

16
New cards

Memory usage

classes use no memory while objects use memory to store data and actions

17
New cards

Multiplicity

the number of object links shown in a UML association

18
New cards

Association

a basic link showing two classes are connected

19
New cards

Dependency

a uses link where one class relies on another to function

20
New cards

Aggregation

a whole and part link where the part belongs to one parent

21
New cards

Inheritance

a link where a child class extends a parent class

22
New cards

Polymorphism

the ability for one action name to behave differently for different objects

23
New cards

Static polymorphism

method choice decided by parameters at compile time

24
New cards

Dynamic polymorphism

method choice decided by the object at run time

25
New cards

Encapsulation

keeping data and actions together and controlling access to protect them

26
New cards

Need to reduce dependencies

reducing links between classes to improve reuse and flexibility

27
New cards

Primitive type

a basic built in type used to store simple data

28
New cards

Integer

a type used to store whole numbers

29
New cards

Real number

a type used to store numbers with fractional values

30
New cards

Boolean

a type that stores true or false

31
New cards

String

a sequence of characters stored as a reference type

32
New cards

Parameter

a variable used inside a method definition

33
New cards

Argument

the value passed into a method when the method is used

34
New cards

Local variable

a variable created inside a block of code

35
New cards

Extends

the keyword that creates inheritance

36
New cards

Static

a class level item shared across all objects of that class

37
New cards

Selection statement

a structure that makes decisions in code

38
New cards

If statement

a condition that runs code only when it is true

39
New cards

Else statement

a branch that runs when earlier conditions are not met

40
New cards

For loop

a loop used when the number of repeats is known

41
New cards

While loop

a loop that repeats while its condition stays true

42
New cards

Do while loop

a loop that always runs once before checking the condition

43
New cards

Array

a fixed size list of items of the same type

44
New cards

Index

the position of an item in an array starting at zero

45
New cards

Modularity

splitting a program into smaller sub programs

46
New cards

Programming team advantage

more people can handle larger tasks

47
New cards

Programming team disadvantage

more communication and coordination are needed

48
New cards

Internationalization

designing software so it can fit many languages and regions

49
New cards

Unicode

a standard that represents characters from many writing systems

50
New cards

Ethical obligation

duty of programmers to test secure and credit work correctly

51
New cards

Recursion

a technique where a method solves a task by calling itself with a smaller version of the task

52
New cards

Base case

the condition that stops a recursive call

53
New cards

Recursive step

the part of a recursive method that calls itself again

54
New cards

Factorial recursion

a recursive definition where n factorial is n times factorial of n minus one

55
New cards

Fibonacci recursion

a recursive definition where each term is the sum of the previous two terms

56
New cards

Euclidean GCD recursion

a process that keeps reducing two numbers until they match

57
New cards

Exponent recursion

a method defined by a to the power n equals a times a to the power n minus one

58
New cards

Object reference

a value that points to where an object is stored

59
New cards

This keyword

a reference to the current object

60
New cards

Class as datatype

using a class as the type for an attribute

61
New cards

Stack

a structure that follows last in first out

62
New cards

Push

adding an element to the top of a stack

63
New cards

Pop

removing the top element of a stack

64
New cards

Peek stack

viewing the top element without removing it

65
New cards

Queue

a structure that follows first in first out

66
New cards

Enqueue

adding an element to the back of a queue

67
New cards

Dequeue

removing the element at the front of a queue

68
New cards

Peek queue

viewing the front element without removing it

69
New cards

ADT list

a description of list actions without stating how they are coded

70
New cards

IsEmpty list

a check to see whether a list has no items

71
New cards

IsFull list

a check used in static lists to see if they cannot take more items

72
New cards

Size list

a method that returns how many items are stored

73
New cards

AddHead

adding an element to the start of a static list

74
New cards

AddTail

adding an element to the end of a static list

75
New cards

Remove index

deleting an element at a given position

76
New cards

Present list

displaying the contents of a list

77
New cards

Linked list

a structure made of nodes connected by pointers

78
New cards

Node

a unit that stores data and a link to the next unit

79
New cards

Head pointer

the reference to the first node in a linked list

80
New cards

Ordered list

a list where elements are stored in sorted form

81
New cards

Unordered list

a list where elements are stored without order

82
New cards

ArrayList

a dynamic array structure from the Java library

83
New cards

LinkedList

a dynamic structure using nodes from the Java library

84
New cards

Add index ArrayList

adding an element at a specific position in the list

85
New cards

Clear ArrayList

removing all elements from a list

86
New cards

Contains ArrayList

checking if an element is present in the list

87
New cards

IndexOf

returning the first position of a given element

88
New cards

LastIndexOf

returning the last position of a given element

89
New cards

Iterator

an object that moves through a collection

90
New cards

ListIterator

an iterator that can move forward and backward

91
New cards

AddFirst LinkedList

adding an element to the front of the list

92
New cards

Pop LinkedList

removing the first element of a LinkedList

93
New cards

Peek LinkedList

checking the first element without removing it

94
New cards

Get LinkedList

retrieving an element from a specific position

95
New cards

Library advantage testing

a benefit because library code is already tested

96
New cards

Library advantage reuse

a benefit because the same code can be used many times

97
New cards

Library advantage size

a benefit because programs stay shorter

98
New cards

Stack ADT feature

a structure that follows last in first out and produces errors if empty

99
New cards

Queue ADT feature

a structure that follows first in first out and produces errors if empty

100
New cards

Binary tree ADT

a structure of nodes each with a left and right child