1/67
Looks like no tags are added yet.
Class
A user-defined data type in C++ that holds data and member functions.
Member Function
A function that belongs to a class and operates on its data.
Public Members
Class members accessible from outside the class.
Private Members
Class members accessible only from inside the class.
Encapsulation
Restricting direct access to data by using private members and public functions.
Throttle Class
An example C++ class used to control fuel flow with a position variable.
Constructor
A special member function used to initialize objects of a class.
Constructor Rules
Must have same name as class, no return type, automatically called.
Inline Member Function
A member function defined inside the class definition.
Namespace
A container used to avoid naming conflicts between identifiers.
Header File
Contains class definitions, function prototypes, and documentation.
Implementation File
Contains function implementations for a class.
Macro Guard
Prevents multiple inclusions of a header file using #ifndef/#define.
Value Semantics
Defines how objects are copied using assignment operator and copy constructor.
Assignment Operator
Copies the value of one object to another.
Copy Constructor
Initializes an object as a copy of another object.
Default Argument
A function parameter value used when no argument is supplied.
Value Parameter
A parameter passed by copying its value.
Reference Parameter
A parameter passed by reference, allowing modification.
Const Reference Parameter
A reference parameter that cannot be modified.
Operator Overloading
Defining how operators like + or == work with custom types.
Binary Operator
An operator that takes two operands.
Comparison Operator Overload
Defines operators like == for custom classes.
Arithmetic Operator Overload
Defines operators like + for custom classes.
Stream Insertion Operator
operator<< used for output with cout.
Stream Extraction Operator
operator>> used for input with cin.
Friend Function
A non-member function that can access private class members.
Container Class
A class designed to store and manage collections of data.
Bag
A container class that holds unordered items with duplicates allowed.
Bag Initial State
An empty bag with zero items.
Insert Operation
Adds an item to a bag.
Remove Operation
Deletes one occurrence of an item from a bag.
Occurrences Function
Counts how many times a value appears in a bag.
Static Bag
A bag implemented using a fixed-size array.
Dynamic Bag
A bag implemented using a dynamically allocated array.
Pointer
A variable that stores a memory address.
Dereferencing
Accessing the value a pointer points to using *.
Dynamic Variable
A variable allocated during runtime using new.
Dynamic Array
An array allocated at runtime with a size chosen during execution.
new Operator
Allocates memory dynamically on the heap.
delete Operator
Releases dynamically allocated memory.
delete[]
Used to free dynamically allocated arrays.
Pointer Parameter
A function parameter that receives a memory address.
Array Parameter
Arrays passed to functions are treated as pointers.
Reserve Function
Changes the capacity of a dynamic container.
Destructor
A special function that frees resources when an object is destroyed.
Destructor Rules
Same name as class with ~, no parameters, no return type.
Phases of Software Development
Specification, design, implementation, analysis, testing, maintenance, obsolescence.
Specification Phase
Defines what the program must do.
Design Phase
Plans how the program will solve the problem.
Implementation Phase
Writing the actual code.
Precondition
A condition that must be true before a function runs correctly.
Postcondition
A condition that will be true after a function finishes.
Procedural Abstraction
Focusing on what a function does, not how it works.
assert
Used to enforce preconditions during runtime.
Running Time Analysis
Evaluating how execution time grows with input size.
Input Size
The amount of data processed by a program.
Big-O Notation
Describes algorithm growth rate ignoring constants.
O(log n)
Logarithmic time complexity.
O(n)
Linear time complexity.
O(n²)
Quadratic time complexity.
Best-Case Runtime
Minimum time required for an algorithm.
Worst-Case Runtime
Maximum time required for an algorithm.
Average-Case Runtime
Expected time over all inputs.
Testing
Running programs with known inputs to verify correctness.
Boundary Testing
Testing edge-case input values.
Debugging
Finding and fixing errors in a program.