This preview shows page 1 out of 4 pages.

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

Unformatted text preview:

15-214 Exam Review SheetAll Course Topics1. Object-oriented ConceptsTerms you should be able to define:- subtype polymorphism and dynamic dispatch- abstract classes and methods- superclass / base class- subclass / derived class- subtyping (and subtype/supertype) – semantics as substitutability- inheritance- overridingHow does object-oriented programming differ from procedural programming (e.g. as in C)?Most fundamentally, OO organizes code around data objects rather than proceduresOO tends to be driven more bottom-up than top-down, which facilitates re-use as it emphasizes reusable fundamental conceptsOO designs tend to follow concepts from the problem domainThis minimizes required change when the problem changesThis also makes the program easier to extend with new problem domain concepts, assuming they follow patterns set out by earlier concepts.Benefits of object-oriented interfacesThey specify the design and semantics of an object independent of its implementationAllows separate development of clients and implementationShields clients from changes to the implementationAllows clients to treat two implementations uniformly, including mixing them or interoperating 2. Java SemanticsJava concepts you should understand:- final (as applied to fields, methods, and classes)- static (as applied to fields and methods – we will not test you on static inner classes)- public/private/protected (we will not test you on package visibility)- packages (as a way to organize code)- parameterized typesUnderstand and be able to draw the conceptual layout of objects and arrays in the heap.Explain subtyping rulesImplementor of an interface must have at least the methods the interface doesMethod implementations must have the same argument types Method implementations must have the same result type, or a subtype of the type specified in the interfaceThe method should behave as specified in the interface (e.g. with comments or pre/post-conditions)Explain or simulate method dispatch in JavaChoose among overloaded methods (compile time)Identify typechecking errors when no appropriate method exists (compile time)Choose appropriate method implementation (run time dispatch)3. Design PrinciplesDesign for change – the most important OO design principleUnderstand the variations in your problem domain – both as the problem exists right now, and how the problem is anticipated to change in the future. I.e. answer what are the concepts, and how do they vary?Encapsulate those variations using subtyping so that you can plug in different implementations of a concept, and clients will be unaffected.EncapsulationAn object hides its internals from the outside world, which can only access the object through public methods. “Internals” really means whatever is likely to change.Representation is something that is often (but not always) likely to change. Therefore fields are often made private or protected so that the representation of an object can be changed without affecting clients.ReuseIdentify commonalities between concepts that vary, and provide libraries that capture those commonalities. Inheritance is sometimes the most convenient way to share thosecommonalities because the shared code is part of the same object as the variant code. Using different objects for shared and variant code, connected by interfaces, can sometimes be more flexible, however.Design processUse nouns/verbs as a guideline for objects and their properties, and their methodsIdentify the responsibilities of an object and the objects it collaborates withRefine the design using the criteria above4. Design PatternsUnderstand what a design pattern is and why it is useful.Know the design patterns discussed in class: Strategy, Observer, Decorator, Factory Method, Abstract Factory, Singleton, Command, Adapter, Façade, Template Method, Iterator, and Composite.For each pattern, be able to identify it in source code, come up with the name given a description or viceversa, be able to draw the basic structure of the pattern in UML or sketch code that implements it, suggest a pattern applicable to a problem situation, and make arguments about the pattern’s design consequences (benefits and drawbacks) in a given setting.5. ConcurrencyBe able to reason about potential speedup using Amdahl’s law, as well as concepts such as work, depth, and breadth.Define, distinguish, identify, and give examples of deadlocks, race conditions, and data races.Apply the map-reduce paradigm to solve simple problems in parallelUnderstand the semantics of synchronization in Java: in particular, per-object re-entrant locks.6. FrameworksExplain the difference between a library and a framework, and describe examples of eachDescribe tradeoffs between the generality of a framework and the support that it provides for any given programDefine and use framework-related terms such as API, plugin, extension point, protocol, callback, and lifecycle method.Should extending a framework require modifying the source code of the framework?7. Static AnalysisCharacterize the kinds of errors that static analysis can find.Describe the tradeoffs between static analysis and other quality assurance approaches, such as testing. Explain these tradeoffs in a particular context, such as finding race conditions.Apply principles of applying static analysis in practice, e.g. the need to customize a generic static analysis tool such as FindBugs to a particular engineering organization.Describe how static analysis can analyze all possible executions of a program even without running all of those executions explicitly.Explain how design intent and other forms of specification (e.g. as provided in JSure) can help make analysis both more modular and more effective.Define soundness, completeness, false positives, and false negatives.Explain how issues of aliasing, uniqueness, and thread-locality bear on properties like safe concurrency.8. Distributed SystemsDescribe the high-level challenges that make distributed systems especially difficult. Examples: inconsistency, security, and failure (especially partial failure and silent failures).Describe the benefits and costs of caching, including tradeoffs between simplicity, consistency, bandwidth, and


View Full Document

CMU CS 15214 - Exam Review

Download Exam Review
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 Exam Review 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 Exam Review 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?