Misc Flashcards
Scope of Names
Declared names are only valid within the name’s scope.
Must be declared before it is called and be within the boundaries of braces
Swapping
Assign y’s value to x and x’s value to y
Requires a third variable to temporarily hold one value while the other is copied over.
Unit Testing
Process of individually testing a small part of a program
Testbench
aka Test Harness
Program whose purpose is to check that a function returns correct output values for a variety of input values
Test Vector
Unique set of input values
Border Cases
Fringe scenarios in test vectors
Reference Variable
Refers to another variable
Object
Internal data plus operations that can be performed on that data
ostream
Output Stream
Class that supports output via #include
Uses the insertion operator (<
istream
Input Stream
Class that supports input via #include
Uses extraction operator (»)
Manipulator
Used for output formatting with «_space;or»_space;
Polymorphism
Determining which program behavior to execute depending on data types
Exception-handling constructs
aka try, throw, catch
Keeps error-checking code separate to reduce redundant checks