DOC PREVIEW
Yale CPSC 427 - Study Guide to Exam 2
School name Yale University
Pages 8

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Interacting Classes and UML (cont.) [lecture 12]Design Exercise: Family Datebook [lecture 12]Model-Viewer-Controller Paradigm [lecture 12]Demo: Stopwatch [lecture 12]Demo: Stopwatch [lecture 13]Demo: Hangman Game [lecture 13]Game RulesCode DesignStorage ManagementRefactored GameDemo: Hangman Game (cont.) [lecture 14]Refactored GameCoding Practices Reminders [lecture 14]Casts and Conversions [lecture 14]Operator Extensions [lecture 14]Virtue Demo [lecture 15]Linear Data Structure Demo [lecture 15]Templates [lecture 15]Multiple Inheritance [lecture 16]Handling Circularly Dependent Classes [lecture 16]Template Example [lecture 16]The C++ Standard Library [lecture 16]The C++ Standard Library (cont.) [lecture 17]STL and Polymorphism [lecture 18]Exceptions [lecture 18]Exceptions (cont.) [lecture 19]Design Patterns [lecture 19]Design Patterns for Flexible and Reusable Design [lecture 20]Software EngineeringStrategy PatternDesign Patterns for Flexible and Reusable Design (continued) [lecture 21]Factory PatternDecorator PatternDesign Pattern ClassificationObserver PatternGraphical User Interfaces [lecture 22]The gtkmm Framework [lecture 22]YALE UNIVERSITYDEPARTMENT OF COMPUTER SCIENCECPSC 427a: Object-Oriented Programming Handout #9Professor M. J. Fischer December 1, 2010Study Guide to Exam 2For the exam, you are responsible for everything covered by exam 1 (see Study Guide toExam 1) as well as the following materials covered since that exam: the contents of lectures12–22 and corresponding class demos, the concepts used in problem set 4, and the entiretextbook (Chapters 1–18) except for the following sections:• Omit section 8.4 (event traces)• Omit chapter 11 (modules and makefiles)• Omit section 16.6 (virtual inheritance)Below is an index to the lecture notes. It lists all of the sections, subsections, and slidetitles from lectures 12–22.33 Interacting Classes and UML (cont.) [lecture 12]• Accessing B in A’s methods• “Law” of Consistency/Encapsulation• “Law” of Demeter• “Law” of Demeter34 Design Exercise: Family Datebook [lecture 12]• Design Exercise: FamilyDatebook35 Model-Viewer-Controller Paradigm [lecture 12]• Model-Viewer-Controller design paradigm36 Demo: Stopwatch [lecture 12]• Realtime measurements37 Demo: Stopwatch [lecture 13]• Realtime measurements• HirezTime class• HirezTime class structure• StopWatch class2 Study Guide to Exam 238 Demo: Hangman Game [lecture 13]38.1 Game Rules• Hangman game38.2 Code Design• Overall design• Use cases• Code structure: Model• Code structure: Viewer and controller• Class Game38.3 Storage ManagementStorage management13 • String store38.4 Refactored Game• Refactored hangman game• Flex arrays• Flex array implementation issues• String store limitation39 Demo: Hangman Game (cont.) [lecture 14]39.1 Refactored Game• Refactored hangman game• Flex arrays• Flex array implementation issues• String store limitation• Refactoring Board class40 Coding Practices Reminders [lecture 14]• Get and set functions• Coping with privacy problems• Type safety41 Casts and Conversions [lecture 14]• Casts in C• Different kinds of casts• C++ casts• Explicit cast syntax• Implicit casts• AmbiguityHandout #9—December 1, 2010 3• explicit keyword42 Operator Extensions [lecture 14]• How to define operator extensions• Other special cases43 Virtue Demo [lecture 15]• Virtual virtue• Main virtue44 Linear Data Structure Demo [lecture 15]• Using polymorphism• Interface file• Class Linear• Example: Stack• Example: Queue• Class structure• C++ features• #include structure45 Templates [lecture 15]• Template overview• Template functions• Specialization• Template classes• Compilation issues• Template parameters• Using template classes46 Multiple Inheritance [lecture 16]• What is multiple inheritance• Object structure• Diamond pattern47 Handling Circularly Dependent Classes [lecture 16]• Tightly coupled classes• Example: List and Cell• Circularity with #include• What happens?• Resolving circular dependencies4 Study Guide to Exam 248 Template Example [lecture 16]• 16-Multiple-template• Container class hierarchy• Item class hierarchy• Ordered template class• Alternative Ordered interfaces49 The C++ Standard Library [lecture 16]• A bit of history• Containers• Common container operations• vector<T>50 The C++ Standard Library (cont.) [lecture 17]• Iterators• Iterator example• Using iterator inside a class• Using subscripts and size()• Algorithms• STL sort algorithm• Reverse sort example• Reverse sort example (cont.)• pair<T1, T2>• map<Key,Val>• Using a map<Key,Val>• Copying from one container to another• Copying from one container to another – example• string class51 STL and Polymorphism [lecture 18]• Derivation from STL containers• Replacing authority with understanding• Two kinds of derivation• How are they the same?• What is simple derivation good for?• What are the problems with simple derivation?• What is polymorphic derivation good for?• What are the problems of polymorphic derivation?• Contrasts between simple and polymorphic derivation• Containment as an alternative to simple derivation• Argument for containment• STL container as a base class• Can I turn an STL container into a polymorphic base class?Handout #9—December 1, 2010 5• A polymorphic base class• Dynamic cast52 Exceptions [lecture 18]• Exceptions• Exception handling• C-style solution using status returns• C++ exception mechanism53 Exceptions (cont.) [lecture 19]• C++ exception mechanism (recall)• Throwing an exception• Catching an exception• What kind of object should an exception throw?• Standard exception class• Catching standard exceptions• Deriving your own exception classes from std::exception• Multiple catch blocks• Rethrow• Throw restrictions• Uncaught exceptions: Ariane 5• Uncaught exceptions: Ariane 5 (cont.)• Termination54 Design Patterns [lecture 19]• General OO principles• What is a design pattern?• Adaptor pattern• Adaptor diagram• Indirection• Proxy pattern• Polymorphism pattern• Polymorphism diagram• Controller• Three kinds of controllers• Bridge pattern• Bridge diagram• Subject-Observer or Publish-Subscribe: problem• Subject-Observer or Publish-Subscribe: pattern• Subject-Observer or Publish-Subscribe: diagram•


View Full Document

Yale CPSC 427 - Study Guide to Exam 2

Download Study Guide to Exam 2
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Study Guide to Exam 2 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Study Guide to Exam 2 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?