The final exam • Other finals review Final Exam Review – CSH Review • November 17 th – 7pm – 10pm • Gracies – Recall • Final: November 18 th • 12:30pm – 2:30pm • 70-3690 Plan for today UML • Everything we learned • Use Case Diagram – Shows scenerios of external interaction with system – In less than 50 minutes! • Sequence Diagrams – Show sequence of method calls for a given use case • Course Evaluations • Class Diagram – Shows classes that make up your system and relationships between them C++ Intro C++ Tour 1 • Variables: • C++ is superset of C – Basic – Designed for memory manipulation – Pointer • Source + Header file – Reference • Compilation & Linking – Interesting operators • & address of • * dereference • -> dereference / access member
C++ Tour 2 Operators • static • Can redefine basic operators on classes • Const – Including the assignment operator – operator# • Functions – Pass by value • Friends • Arrays – Almost equivalent to pointer – New / delete / delete [] Constructors/Destructors The we hade Exam 1 • Default constructor • Copy constructor – If you do non-trivial work in constructor • Should have copy constructor and operator= • Difference between copy & operator= • Initializer List – Preferred way of doing things – Sometimes the ONLY way – Order of initialization • Destructors – If you new, you must delete Inheritance I Inheritance II • Basic Concepts, Terms, Syntax • Memory Layout of derived class – Why you must call constructor of base class • Polymorphism first • Virtual functions • Polymorphism / Slicing • Abstract functions / classes • Base class in Initializer list (no super)
Memory Management Memory Management • How/where data is stored • Memory Woes – Global / Heap / Stack / Code – Memory Leaks • Runtime Stack – Pointer Ownership – Dangling Reference – Stack frame removed when function is done – Overwriting Arrays • Heap – Reference to local variable – new – delete IOStreams IOStreams • Formatted vs Unformatted I/O • Error states and format flags • Insertion and Extraction – Manipulators Templates More Memory Management • Defining / using templates • Smart Pointers – Takes ownership of pointer • Standard Template Library (STL) – Smart pointers and STL containers – Containers – Override operator= and operator-> – Iterators – Algorithms – Functions
Software Testing Then we had exam 2 • Error / Fault / Failure • Unit / Integration / System Test • Preconditions / Postconditions • White Box / Black Box Testing • Equivalence Classes • Assertions Exceptions Exceptions • Throw • Error conditions • Try / catch – Unexpected exception – Uncaught exception – Exception hierarchies • Exceptions and Memory Management – (…) – Stack unwinding • Exceptions vs Assertions • Exception specification – Not required but guarantee if there Function Pointers More Inheritance • Syntax • VTABLES – That silly =0 syntax • Declaration and Assignment – Virtual functions and construction – Signature must be the same! – Virtual functions and destructors • Functors – Overrides the operator() – Can have state and extra methods
Ethics And there you have it! • Hackers • Any questions? • Free Software • Open Source • GNU Public License • Thanks to all… • Linux woes – SCO vs. IBM
Recommend
More recommend