cs246-final-review-slides

cs246-final-review-slides - CS 246 Final Exam Review Peter...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 246 Final Exam Review Peter Beshai Spring 2009
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 246 Final Exam Review (Spring 2009) 2 Pre-Midterm Material C++ basic types arrays pointers static vs. dynamic allocation keywords: const, static, typedef, #ifndef etc. I/O ( cin, cout ) classes, compiler generated functions, friends scope
Background image of page 2
CS 246 Final Exam Review (Spring 2009) 3 Pre-Midterm Material UML comprehension implementation implications
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 246 Final Exam Review (Spring 2009) 4 Pre-Midterm Material Defensive Programming general idea different defences make bugs impossible by design make bugs immediately visible debugging is the last resort
Background image of page 4
CS 246 Final Exam Review (Spring 2009) 5 Pre-Midterm Material Inheritance access qualifers (public, private, protected) Friendship constructors, destructors
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CS 246 Final Exam Review (Spring 2009) 6 Polymorphism Basics What is polymorphism? What is one of the main beneFts of polymorphism? What is necessary to achieve polymorphism in C++? What are the two types we need to consider when working with a polymorphic object in C++?
Background image of page 6
CS 246 Final Exam Review (Spring 2009) 7 Polymorphism Static vs. Dynamic Types Base *b = new Base; Derived *d = new Derived; Base *z = new Derived; Which function gets called? 1) b->two() 4) d->one() 2) d->two() 5) z->three() 3) z->one() 6) z->two()
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
8 Polymorphism Particulars What is object slicing? Explain what happens in the following code snippet:
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 30

cs246-final-review-slides - CS 246 Final Exam Review Peter...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online