Announcement Final exam Final Exam Review Tuesday, May 20 th - - PDF document

announcement
SMART_READER_LITE
LIVE PREVIEW

Announcement Final exam Final Exam Review Tuesday, May 20 th - - PDF document

Announcement Final exam Final Exam Review Tuesday, May 20 th 2:45 4:45pm Rm 70-1620 No makeup exams! Plan for today UML Everything we learned Use Case Diagram Shows scenerios of external interaction with


slide-1
SLIDE 1

Final Exam Review Announcement

  • Final exam

– Tuesday, May 20th – 2:45 – 4:45pm – Rm 70-1620

  • No makeup exams!

Plan for today

  • Everything we learned

– In less than 50 minutes!

  • Course Evaluations

UML

  • Use Case Diagram

– Shows scenerios of external interaction with system

  • Sequence Diagrams

– Show sequence of method calls for a given use case

  • Class Diagram

– Shows classes that make up your system and relationships between them

C++ Intro

  • C++ is superset of C

– Designed for memory manipulation

  • Source + Header file
  • Compilation & Linking

C++ Tour 1

  • Variables:

– Basic – Pointer – Reference – Interesting operators

  • & address of
  • * dereference
  • -> dereference / access member
slide-2
SLIDE 2

C++ Tour 2

  • static
  • Const
  • Functions

– Pass by value

  • Arrays

– Almost equivalent to pointer – New / delete / delete []

Operators

  • Can redefine basic operators on classes

– Including the assignment operator – operator#

  • Friends

Constructors/Destructors

  • 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

  • Basic Concepts, Terms, Syntax
  • Polymorphism
  • Virtual functions
  • Abstract functions / classes
  • Base class in Initializer list (no super)

Inheritance II

  • Memory Layout of derived class

– Why you must call constructor of base class first

  • Polymorphism / Slicing

The we hade Exam 1

slide-3
SLIDE 3

Memory Management

  • How/where data is stored

– Global / Heap / Stack / Code

  • Runtime Stack

– Stack frame removed when function is done

  • Heap

– new – delete

Memory Management

  • Memory Woes

– Memory Leaks – Pointer Ownership – Dangling Reference – Overwriting Arrays – Reference to local variable

Memory Management

  • Smart Pointers

– Takes ownership of pointer – auto_ptr – Smart pointers and STL containers – Override operator= and operator->

IOStreams

  • Formatted vs Unformatted I/O
  • Error states and format flags
  • Insertion and Extraction

– Manipulators

IOStreams Software Testing

  • Error / Fault / Failure
  • Unit / Integration / System Test
  • Preconditions / Postconditions
  • White Box / Black Box Testing
  • Equivalence Classes
  • Assertions
slide-4
SLIDE 4

Templates

  • Defining / using templates
  • Standard Template Library (STL)

– Containers – Iterators – Algorithms – Functions

Then we had exam 2 Exceptions

  • Throw
  • Try / catch

– Exception hierarchies – (…) – Stack unwinding

  • Exception specification

– Not required but guarantee if there

Exceptions

  • Error conditions

– Unexpected exception – Uncaught exception

  • Exceptions and Memory Management
  • Exceptions vs Assertions

Function Pointers

  • Syntax
  • Declaration and Assignment

– Signature must be the same!

  • Functors

– Overrides the operator() – Can have state and extra methods

Ethics

  • Code of ethics
  • Free Software
  • Open Source
  • GNU Public License.
slide-5
SLIDE 5

And there you have it!

  • Any questions?
  • Thanks to all…

Finally

  • Course Evaluations.