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
Q

Binary Search Tree

A

Left Child < Parent <= Right Child

26
Q

Red-Black Tree

A

Balanced Binary Search Tree uses colors

27
Q

Graph

A

Set of vertices and edges (with possible directions and weights)

28
Q

Bubble Sort

A

Iterate and swap pairs, iterate again on one less item, etc – O(n^2)

29
Q

Selection Sort

A

Iterate and select the smallest, then second smallest, etc – O(n^2)

30
Q

Insertion Sort

A

Cascade items successively into place - Best O(n) if already sorted; Worst O(n^2)

31
Q

Merge Sort

A

Recursively split on a pivot then merge the arrays back up into sorted order - O(n lg n)

32
Q

Heap Sort

A

Builds a heap then exchanges elements to push down O(n lg n) - NOT STABLE

33
Q

Quicksort

A

Split into two arrays (greater than pivot, less than pivot) and recurse - worst case O(n^2), best case O(n lg n)

34
Q

Counting Sort

A

Only for integers with known maximum; count the occurences of 1s, 2s, etc - O(n)

35
Q

Radix Sort

A

Uses another stable sort on each digit - O(n)

36
Q

Bucket Sort

A

Uses equal size buckets across [0, 1) - O(n)

37
Q

Coffman Condition 1

A

Mutual exclusion - a resource can’t be shared

38
Q

Coffman Condition 2

A

Resource holding - a process is holding one resource and is requesting more

39
Q

Coffman Condition 3

A

No preemption - the process itself must release resources

40
Q

Coffman Condition 4

A

Circular wait - the processes are waiting on each other to release resources

41
Q

Dynamic Programming

A

Optimizing the solution based on the data - ex. Multiplying matrices in a different order

42
Q

Breadth First Search

A

Finds the minimum distances from one source to all edges O(V+E)

43
Q

Depth First Search

A

Marks up the graph

44
Q

Pre/Post/In Order Traversal

A

Pre = N L R, In = L N R, Post = L R N

45
Q

Topological Sort

A

Performs DFS to get order of dependencies

46
Q

NP-Complete

A

Cannot be completed in polynomial time (exponential)

47
Q

Memory segmentation

A

Data - initialized variables, BSS - uninitialized variables, Heap - area for dynamic allocation, Stack - function calls and automatic variables

48
Q

Semaphore vs Mutex

A

Mutex same as binary semaphore. Mutex tracks the owner process that locked it

49
Q

Rendezvous

A

Used in multi-threading to pause a thread until other threads reach a certain execution point

50
Q

Race Condition

A

Output is dependent on the sequence or timing of threads

51
Q

Interprocess Communication Methods

A

Shared memory, file system, pipe, socket

52
Q

Singleton

A

Only one instance of a class exists

53
Q

How inheritance looks on class diagram

A

Arrow from derived to base with solid line and unfilled head

54
Q

Two-way association on class diagram

A

solid line with multiplicity on each side and member names on opposite sides

55
Q

One-way association on class diagram

A

Skeleton arrow with solid line pointing to class that is known about

56
Q

Aggregation on class diagram

A

Skeleton arrow container to contained with unfilled diamond on container

57
Q

Composition on class diagram

A

Skeleton arrow container to contained with filled diamond on containter