Software Engineering Flashcards

1
Q

Abstract Class

A

Intentionally incomplete class definition; has some members declared ‘abstract’ and children must implement them; objects cannot be created

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Encapsulation

A

Implementation should be completely separate from the interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Child Class

A

A class that extends another class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Aggregation

A

has-a relationship; contained object can survive without the container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Immutable

A

A value that cannot be changed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Inheritence

A

Ability of a class to duplicate its parent’s members

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Instance

A

An object that has been created from a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Interface

A

Supplies definition for methods - kind of like a .h file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Composition

A

is-a relationship; contained object cannot survive without the container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Polymorphism

A

Allows a child class to be used anywhere a method requires the parent class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Private

A

Only the class itself can read/write

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Protected

A

Only the class itself and children can read/write

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Public

A

Anything can read/write

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Uses-A

A

Relationship between objects that call methods and use member variables of other objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Object Based vs Object Oriented

A

Object based has no inheritence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Association

A

One object uses another but does not own it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Virtual member

A

Expected to be implemented in subclasses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Function Overloading vs Overriding

A

Overloading has different parameters, Overriding has same signature but different implementation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Priority inversion

A

Medium priority task preempts a high priority task

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Hash Table

A

Use a mathematical function to take the key and transform it to the domain of an array; resolve collisions by Chaining or OpenAddressing (use an array and fill in empties nearby)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Linked List

A

Elements chained together using pointers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Queue

A

Uses a linked list, FIFO

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Stack

A

Uses a linked list, LIFO

24
Q

Heap

A

Nearly complete binary tree where parent >= child; Heapify (maintain heap structure, O(lg n)); BuildHeap (creates heap from array, O(n)); HeapSort (sorts array in place, O(n lg n)); ExtractMax O(lg n); Insert O(lg n)

25
Binary Search Tree
Left Child < Parent <= Right Child
26
Red-Black Tree
Balanced Binary Search Tree uses colors
27
Graph
Set of vertices and edges (with possible directions and weights)
28
Bubble Sort
Iterate and swap pairs, iterate again on one less item, etc -- O(n^2)
29
Selection Sort
Iterate and select the smallest, then second smallest, etc -- O(n^2)
30
Insertion Sort
Cascade items successively into place - Best O(n) if already sorted; Worst O(n^2)
31
Merge Sort
Recursively split on a pivot then merge the arrays back up into sorted order - O(n lg n)
32
Heap Sort
Builds a heap then exchanges elements to push down O(n lg n) - NOT STABLE
33
Quicksort
Split into two arrays (greater than pivot, less than pivot) and recurse - worst case O(n^2), best case O(n lg n)
34
Counting Sort
Only for integers with known maximum; count the occurences of 1s, 2s, etc - O(n)
35
Radix Sort
Uses another stable sort on each digit - O(n)
36
Bucket Sort
Uses equal size buckets across [0, 1) - O(n)
37
Coffman Condition 1
Mutual exclusion - a resource can't be shared
38
Coffman Condition 2
Resource holding - a process is holding one resource and is requesting more
39
Coffman Condition 3
No preemption - the process itself must release resources
40
Coffman Condition 4
Circular wait - the processes are waiting on each other to release resources
41
Dynamic Programming
Optimizing the solution based on the data - ex. Multiplying matrices in a different order
42
Breadth First Search
Finds the minimum distances from one source to all edges O(V+E)
43
Depth First Search
Marks up the graph
44
Pre/Post/In Order Traversal
Pre = N L R, In = L N R, Post = L R N
45
Topological Sort
Performs DFS to get order of dependencies
46
NP-Complete
Cannot be completed in polynomial time (exponential)
47
Memory segmentation
Data - initialized variables, BSS - uninitialized variables, Heap - area for dynamic allocation, Stack - function calls and automatic variables
48
Semaphore vs Mutex
Mutex same as binary semaphore. Mutex tracks the owner process that locked it
49
Rendezvous
Used in multi-threading to pause a thread until other threads reach a certain execution point
50
Race Condition
Output is dependent on the sequence or timing of threads
51
Interprocess Communication Methods
Shared memory, file system, pipe, socket
52
Singleton
Only one instance of a class exists
53
How inheritance looks on class diagram
Arrow from derived to base with solid line and unfilled head
54
Two-way association on class diagram
solid line with multiplicity on each side and member names on opposite sides
55
One-way association on class diagram
Skeleton arrow with solid line pointing to class that is known about
56
Aggregation on class diagram
Skeleton arrow container to contained with unfilled diamond on container
57
Composition on class diagram
Skeleton arrow container to contained with filled diamond on containter