dso zach exam

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/67

encourage image

There's no tags or description

Looks like no tags are added yet.

68 Terms

1
New cards

Class

A user-defined data type in C++ that holds data and member functions.

2
New cards

Member Function

A function that belongs to a class and operates on its data.

3
New cards

Public Members

Class members accessible from outside the class.

4
New cards

Private Members

Class members accessible only from inside the class.

5
New cards

Encapsulation

Restricting direct access to data by using private members and public functions.

6
New cards

Throttle Class

An example C++ class used to control fuel flow with a position variable.

7
New cards

Constructor

A special member function used to initialize objects of a class.

8
New cards

Constructor Rules

Must have same name as class, no return type, automatically called.

9
New cards

Inline Member Function

A member function defined inside the class definition.

10
New cards

Namespace

A container used to avoid naming conflicts between identifiers.

11
New cards

Header File

Contains class definitions, function prototypes, and documentation.

12
New cards

Implementation File

Contains function implementations for a class.

13
New cards

Macro Guard

Prevents multiple inclusions of a header file using #ifndef/#define.

14
New cards

Value Semantics

Defines how objects are copied using assignment operator and copy constructor.

15
New cards

Assignment Operator

Copies the value of one object to another.

16
New cards

Copy Constructor

Initializes an object as a copy of another object.

17
New cards

Default Argument

A function parameter value used when no argument is supplied.

18
New cards

Value Parameter

A parameter passed by copying its value.

19
New cards

Reference Parameter

A parameter passed by reference, allowing modification.

20
New cards

Const Reference Parameter

A reference parameter that cannot be modified.

21
New cards

Operator Overloading

Defining how operators like + or == work with custom types.

22
New cards

Binary Operator

An operator that takes two operands.

23
New cards

Comparison Operator Overload

Defines operators like == for custom classes.

24
New cards

Arithmetic Operator Overload

Defines operators like + for custom classes.

25
New cards

Stream Insertion Operator

operator<< used for output with cout.

26
New cards

Stream Extraction Operator

operator>> used for input with cin.

27
New cards

Friend Function

A non-member function that can access private class members.

28
New cards

Container Class

A class designed to store and manage collections of data.

29
New cards

Bag

A container class that holds unordered items with duplicates allowed.

30
New cards

Bag Initial State

An empty bag with zero items.

31
New cards

Insert Operation

Adds an item to a bag.

32
New cards

Remove Operation

Deletes one occurrence of an item from a bag.

33
New cards

Occurrences Function

Counts how many times a value appears in a bag.

34
New cards

Static Bag

A bag implemented using a fixed-size array.

35
New cards

Dynamic Bag

A bag implemented using a dynamically allocated array.

36
New cards

Pointer

A variable that stores a memory address.

37
New cards

Dereferencing

Accessing the value a pointer points to using *.

38
New cards

Dynamic Variable

A variable allocated during runtime using new.

39
New cards

Dynamic Array

An array allocated at runtime with a size chosen during execution.

40
New cards

new Operator

Allocates memory dynamically on the heap.

41
New cards

delete Operator

Releases dynamically allocated memory.

42
New cards

delete[]

Used to free dynamically allocated arrays.

43
New cards

Pointer Parameter

A function parameter that receives a memory address.

44
New cards

Array Parameter

Arrays passed to functions are treated as pointers.

45
New cards

Reserve Function

Changes the capacity of a dynamic container.

46
New cards

Destructor

A special function that frees resources when an object is destroyed.

47
New cards

Destructor Rules

Same name as class with ~, no parameters, no return type.

48
New cards

Phases of Software Development

Specification, design, implementation, analysis, testing, maintenance, obsolescence.

49
New cards

Specification Phase

Defines what the program must do.

50
New cards

Design Phase

Plans how the program will solve the problem.

51
New cards

Implementation Phase

Writing the actual code.

52
New cards

Precondition

A condition that must be true before a function runs correctly.

53
New cards

Postcondition

A condition that will be true after a function finishes.

54
New cards

Procedural Abstraction

Focusing on what a function does, not how it works.

55
New cards

assert

Used to enforce preconditions during runtime.

56
New cards

Running Time Analysis

Evaluating how execution time grows with input size.

57
New cards

Input Size

The amount of data processed by a program.

58
New cards

Big-O Notation

Describes algorithm growth rate ignoring constants.

59
New cards

O(log n)

Logarithmic time complexity.

60
New cards

O(n)

Linear time complexity.

61
New cards

O(n²)

Quadratic time complexity.

62
New cards

Best-Case Runtime

Minimum time required for an algorithm.

63
New cards

Worst-Case Runtime

Maximum time required for an algorithm.

64
New cards

Average-Case Runtime

Expected time over all inputs.

65
New cards

Testing

Running programs with known inputs to verify correctness.

66
New cards

Boundary Testing

Testing edge-case input values.

67
New cards

Debugging

Finding and fixing errors in a program.

68
New cards