OOP test 2

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

1/53

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

54 Terms

1
New cards

Object-Oriented Programming (OOP)

A style of programming focused on the use of classes and class hierarchies

2
New cards

Polymorphism

(not on this exam)

3
New cards

Inheritance

Reuse and extension of fields and method implementations from another class

4
New cards

Encapsulation

Bundling data and code into a restricted container

5
New cards

Abstraction

Specifying a general interface while hiding implementation details (sometimes listed as a 4th fundamental concept of OOP, though I believe it's common to most paradigms)

6
New cards

Primitive type

A data type that can typically be handled directly by the underlying hardware

7
New cards

Enumerated type

A data type that includes a fixed set of constant values called enumerators

8
New cards

Class

A template encapsulating data and code that manipulates it

9
New cards

Interface

A reference type containing only method signatures, default methods, static methods, constants, and nested types

10
New cards

Instance

An encapsulated bundle of data and code (e.g., an instance of a program is a process; an instance of a class is an object)

11
New cards

Object

An instance of a class containing a set of encapsulated data and associated methods

12
New cards

Variable

A block of memory associated with a symbolic name that contains a primitive data value or the address of an object instance

13
New cards

Operator

A short string representing a mathematical, logical, or machine control action

14
New cards

Field

A class member variable (also called an "attribute" or "class variable")

15
New cards

Constructor

A special class member that creates and initializes an object from the class

16
New cards

Destructor

A special class member that cleans up when an object is deleted (not supported by Java)

17
New cards

Method

A function that manipulates data in a class (also called a "class function")

18
New cards

Getter

A method that returns the value of a private variable

19
New cards

Setter

A method that changes the value of a private variable

20
New cards

Multiple Inheritance

A subclass inheriting class members from two or more superclasses

21
New cards

Superclass

The class from which members are inherited

22
New cards

Subclass

The class inheriting members

23
New cards

Abstract Class

A class that cannot be instantiated

24
New cards

Abstract Method

A method declared with no implementation

25
New cards

Override

A subclass replacing its superclass’ implementation of a method

26
New cards

Declaration

A statement that introduces a name with an associated type into a scope

27
New cards

Definition

A declaration that also fully specifies the entity declared

28
New cards

Shadowing

A variable declared in a narrower scope than that of a variable of the same name declared in a broader scope

29
New cards

Namespace

A named scope

30
New cards

Package

A grouping of related types providing access protection and namespace management

31
New cards

Algorithm

A procedure for solving a specific problem, expressed as an ordered set of actions

32
New cards

Exception

An object created to represent an error or other unusual occurrence and then propagated via special mechanisms until caught by special handling code

33
New cards

Assertion

An expression that, if false, indicates a program error (in Java, via the assert keyword)

34
New cards

Invariant

Code for which specified assertions are guaranteed to be true (often, a class in which fields cannot change after instantiation)

35
New cards

Data Validation

Ensuring that a program operates on clean, correct and useful data

36
New cards

Validation Rules

Algorithmically enforceable constraints on the correctness, meaningfulness, and security of input data

37
New cards

Version Control

The task of keeping a system consisting of many versions well organized

38
New cards

Branch

A second distinct development path within the same organization and often within the same version control system

39
New cards

Fork

A second distinct and independent development path undertaken (often by a different organization) to create a unique product

40
New cards

Baseline

A reference point in a version control system, usually indicating completion and approval of a product release and sometimes used to support a fork

41
New cards

Unified Modeling Language (UML)

The standard visual modeling language used to describe, specify, design, and document the structure and behavior of object-oriented systems

42
New cards

Class Hierarchy

Defines the inheritance relationships between a set of classes

43
New cards

Class Library

A collection of classes designed to be used together efficiently

44
New cards
Relationship - Inheritance (generalization)
Solid line with a hollow triangle arrowhead pointing to the superclass. Maps to “extends” in Java.
45
New cards

implements UML

Dashed line with a hollow triangle arrowhead pointing to the interface. type of inheritance.

46
New cards

Relationship - Directed association

Association (solid line) with an arrow to show navigability (one class knows about the other).

47
New cards
Relationship - Multiplicity examples
1 exactly one; 0..1 optional; * many; 1..* one or more.
48
New cards
Relationship - Composition
Filled/black diamond at the whole end (e.g., Book ◆— Page). Parts have lifecycle bound to the whole.
49
New cards

Relationship - Dependency

dashed line, solid arrow. (java.util.ArrayList)

50
New cards
Relationship - Association class
A class (e.g., Checkout) attached to an association line that holds attributes/operations of the link.
51
New cards

External Type Dependency (java.util.__ usually)

Dashed line closed arrow to depednancy

52
New cards
When to use each relationship
Use inheritance for “is-a”; aggregation/composition for “has-a” whole–part; association for general links; dependency for occasional use/parameter types.
53
New cards

Relationship - Association

Plain solid line between classes showing a semantic connection; can have role names and multiplicities (e.g., 1..*).

54
New cards

Relationship - Aggregation

hollow diamond at bigger part. Parts can outlive the whole.