619 Final Review Fall 2017 Professor Ammann.

Slides:



Advertisements
Similar presentations
Identity and Equality Based on material by Michael Ernst, University of Washington.
Advertisements

The Substitution Principle SWE 332 – Fall Liskov Substitution Principle In any client code, if subtype object is substituted for supertype object,
Mutability SWE 332 Fall 2011 Paul Ammann. SWE 3322 Data Abstraction Operation Categories Creators Create objects of a data abstraction Producers Create.
Data Abstraction II SWE 619 Software Construction Last Modified, Spring 2009 Paul Ammann.
Java 1.5 & Effective Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
Harvey SiyPrinciples of Object-Oriented Software Development by Eliens Slide 1 Behavioral Refinement Principles of Object-Oriented Software Development.
Cmp Sci 187: Midterm Review Based on Lecture Notes.
Chapter 10 Classes Continued
8.1 Classes & Inheritance Inheritance Objects are created to model ‘things’ Sometimes, ‘things’ may be different, but still have many attributes.
CISC6795: Spring Object-Oriented Programming: Polymorphism.
1 Abstraction  Identify important aspects and ignore the details  Permeates software development programming languages are abstractions built on hardware.
CSE 331 SOFTWARE DESIGN & IMPLEMENTATION MIDTERM REVIEW Autumn 2011.
SWE 619 © Paul Ammann Procedural Abstraction and Design by Contract Paul Ammann Information & Software Engineering SWE 619 Software Construction cs.gmu.edu/~pammann/
Effective C#, Chapter 1: C# Language Elements Last Updated: Fall 2011.
Low-Level Detailed Design SAD (Soft Arch Design) Mid-level Detailed Design Low-Level Detailed Design Design Finalization Design Document.
332 Final Review Last updated Fall 2013 Professor Ammann.
Design Patterns Gang Qian Department of Computer Science University of Central Oklahoma.
OO as a language for acm l OO phrase l Mental model of key concepts.
619 Final Review Last updated Spring 2008 © : Paul Ammann.
Type Abstraction Liskov, Chapter 7. 2 Liskov Substitution Principle In any client code, if the supertype object is substituted by a subtype object, the.
Type Abstraction SWE Spring October 05Kaushik, Ammann Substitution Principle “In any client code, if supertype object is substituted.
Inheritance (Part 5) Odds and ends 1. Static Methods and Inheritance  there is a significant difference between calling a static method and calling a.
CS 151: Object-Oriented Design October 15 Class Meeting Department of Computer Science San Jose State University Fall 2013 Instructor: Ron Mak
Object Oriented Programming
Effective Java: Methods Common to All Objects SWE 619: Fall 2008 Paul Ammann.
Data Abstraction SWE 619 Software Construction Last Modified, Spring 2009 Paul Ammann.
(c) University of Washington06-1 CSC 143 Java Inheritance Tidbits.
CSE 341 Section 10 Subtyping, Review, and The Future.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
619 Final Review Last updated Fall 2011 Paul Ammann.
CSCE 240 – Intro to Software Engineering Lecture 3.
Inheritance a subclass extends the functionality of a superclass a subclass inherits all the functionality of a superclass don't reinvent the wheel – "stand.
Modern Programming Tools And Techniques-I
Sections Inheritance and Abstract Classes
Introduction to CS/SWE 332
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
Component Based Software Engineering
Agenda Warmup AP Exam Review: Litvin A2
Adaptive Code Via C#
Type Abstraction SWE Spring 2009.
Inheritance "Question: What is the object oriented way of getting rich? Answer: Inheritance.“ “Inheritance is new code that reuses old code. Polymorphism.
Abstraction Functions and Representation Invariants
Inheritance, Polymorphism, and Interfaces. Oh My
Object Based Programming
SWE 332 Last Modified Spring 2010 Paul Ammann
CSC 480 Software Engineering
Component-Level Design
Introduction to Data Structures
CSE 1030: Data Structure Mark Shtern.
Type Abstraction Liskov, Chapter 7.
Introduction to CS/SWE 332
Organization of Programming Languages
SWE 619 Software Construction Last Modified, Fall 2015 Paul Ammann
Method Verification CS/SWE 332 Paul Ammann.
Java Programming Course
EECE 310: Software Engineering
619 Final Review Last updated Spring 2010 © : Paul Ammann.
More About Inheritance & Interfaces
CS 112 Programming 2 Lecture 02 Abstract Classes & Interfaces (2)
SWE 619 Last modified Fall 2007 Saket Kaushik, Paul Ammann
Lecture 13: Subtyping Rules Killer Bear Climber
CMPE 135 Object-Oriented Analysis and Design March 7 Class Meeting
Type Abstraction SWE Spring 2013.
Jim Fawcett CSE687 – Object Oriented Design Spring 2014
Inheritance Lakshmish Ramaswamy.
Abstract Types Defined as Classes of Variables
Method Verification Paul Ammann.
Presentation transcript:

619 Final Review Fall 2017 Professor Ammann

Agenda Review Topics Covered Highlight Key Technical Concepts Identify Areas for Study on Final Final May Test Several Concepts in a Given Question Goal: Strong Showing on Final

Procedural Abstractions (Liskov 1-3) Specifications Preconditions (Requires Clause) Postconditions (Effects Clause) Modifies Clause You Can Read and Write Such Specifications Issues: Minimality Underdetermined Behavior Deterministic Implementations Generality

Exceptions (Liskov 4, Bloch 9) Rationale for Exceptions Total vs. Partial Specifications Replacing Preconditions with Defined Behavior Role of “FailureException” Specifications Include Exception Returns Checked vs. Unchecked Exceptions Bloch’s List of Standard Exceptions Masking vs. Reflection

Data Abstraction (Liskov 5) Fundamental Topic Expect Significant Exam Coverage Specifications for: Overview (Typical “Object”) Abstraction Function (toString()) Representation Invariant (repOk()) Methods You Can Expect to Write/Modify Some or All of These Understanding, not Formality, is the Focus

More Data Abstraction (Liskov 5) IntSet and Poly Examples Mutability Reasoning about Data Abstractions Role of Abstraction Function Value of Abstraction Function in Specific Examples Role of Representation Invariant Value of Representation Invariant in Specific Examples How to Argue a that Method Meets its Contract Other Issues Exposing the Rep Adequacy

Mutability Key topic Should be comfortable converting between mutable and immutable types Achieving mutability, using guidance from both Liskov and Bloch Transforming mutators to producers Limiting subtyping Limiting changes to instance variables

Iteration Abstraction (Liskov 6) Specifying Iterators Preconditions and Postconditions Constraints on Modifications While Generator is in Use Implementing Iterators in Java Abstraction Functions for Iterators Value of Abstraction Function in Specific Examples Abstraction Function For Extensions Allowing a prev() as well as a next() method Allowing a remove() method

Type Hierarchy (Liskov 7) Fundamental Topic Substitution Principle Uses of Type Hierarchy Extending Behavior vs. Multiple Implementations Mechanisms Extensions, Abstract Classes, Interfaces Understanding Overriding vs. Overloading Dynamic Dispatching Apparent Type vs. Actual Type

Type Hierarchy (Liskov 7) Reasoning About Subtypes Signature Rule Rules for Exceptions Methods Rule Preconditions/Postconditions More Rules for Exceptions Properties Rule

Polymorphic Abstraction (Liskov 8) Element Subtype vs. Related Subtype Comparable vs Comparator Addable vs. Adder Be Prepared to Analyze, Complete, and/or Analyze an Implementation

Methods Common to All Objects (Bloch 3) equals() Transitivity, Symmetry, Substitution for Subtypes hashcode() Consistency with equals() toString() clone() Why is Liskov’s clone() (page 97) wrong? Comparable

Classes and Interfaces (Bloch 4) Immutability Why it is Preferable How to Achieve Composition vs. Inheritance Why is Composition Preferable? Understand Bloch’s InstrumentedSet example Potential Problems for Inheritance Mechanisms to Prohibit Inheritance

Generics (Bloch 5) Replacing raw types with generics Eliminating unchecked warnings Generic interactions with Lists vs. Arrays Covariant Arrays vs. Invariant Generics Generifying types and methods Bounded wildcards Relaxing the invariance of generics

Enums, Annotations (Bloch 6) Problems with C-Style Enums Enums, EnumSet, EnumMap Simple Annotations @Test, @SuppressWarnings, @Override…

Specification Checking Temporal Logic for Specification Computational Tree Logic (CTL) Kansas State University material Links on course schedule Huth and Ryan is also a excellent source

JUnit and JavaDoc JUnit tests for a given JavaDoc description JavaDoc and JUnit for exceptions Contract model and Junit JUnit theories (typed) parameters in test methods Data sources (JUnit) preconditions: assumeTrue(…) postconditions: assertTrue(…) Can you count?

Wrap Up Final Exam Tuesday, December 19 Questions? Closed Book/Closed Notes But One (1) 8.5x11 sheet of paper, handwritten Tuesday, December 19 4:30 PM 2 hours Questions?