15-214 Midterm Review
Tyler Hedrick October 16, 2012
• Threads and Concurrency – Concurrency is a crucial system abstraction (bkgd process while interacting with user) – Concurrency is necessary for performance • Object-oriented programming – Flexible design and reusable code – Organize code bottom-up – Focus on concepts rather than operations • Analysis and Modeling – Practical speciﬁcation techniques and veriﬁcation tools – Address challenges of threading, correct library usage, etc. • Design – Proposing and evaluating alternatives – Modularity, information hiding, and planning for change – Patterns: well-known solutions to design problems • Objects – A package of state (data) and behavior (actions) – Data and actions ∗ Fields - holds an object’s data values · Like the ﬁelds of a struct in C · Access to ﬁelds can be restricted ∗ Methods - describe operations or actions on that data · like functions associated with an abstract data type · have access to all ﬁelds in the object · method calls can be though of as “messages” to the object 1
Subtype polymorphism - the idea of having some sort of superclass that we can subclass giving the subclass a lot of characteristics of the superclass. Example: Bird class that gets inherited by Ostrich, Duck, and Cuckoo. Dynamic dispatch - process of code invocation done at runtime since it cannot be determined at compile time. This is used in object oriented programming where we have multiple methods of the same name which take in diﬀerent types. The invocation of the correct method is only known at runtime. Abstract classes - abstracting code for maximum reuse. Each abstract method deﬁned in an abstract class is inherited by any subclass, but can be overwritten. Abstract classes cannot be instantiated Interface - a “contract”. Any class that implements an interface must have every method detailed in the interface for it to compile. Superclass / bass class - parent class of a...
Please join StudyMode to read the full document