619 Final Review Last updated Fall 2011 Paul Ammann.

Slides:



Advertisements
Similar presentations
Mutability SWE 332 Fall 2011 Paul Ammann. SWE 3322 Data Abstraction Operation Categories Creators Create objects of a data abstraction Producers Create.
Advertisements

Data Abstraction II SWE 619 Software Construction Last Modified, Spring 2009 Paul Ammann.
Effective Java, Chapter 3: Methods Common to All Objects.
Generic programming in Java
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Introduction to Inheritance Fall 2005 OOPD John Anthony.
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.
Review CSC 171 FALL 2004 LECTURE 21. Topics Objects and Classes Fundamental Types Graphics and Applets Decisions Iteration Designing Classes Testing and.
Cmp Sci 187: Midterm Review Based on Lecture Notes.
Abstract Data Types and Encapsulation Concepts
Chapter 6 Class Inheritance F Superclasses and Subclasses F Keywords: super F Overriding methods F The Object Class F Modifiers: protected, final and abstract.
REFACTORING Lecture 4. Definition Refactoring is a process of changing the internal structure of the program, not affecting its external behavior and.
CISC6795: Spring Object-Oriented Programming: Polymorphism.
CSE 332: C++ templates This Week C++ Templates –Another form of polymorphism (interface based) –Let you plug different types into reusable code Assigned.
1 Abstraction  Identify important aspects and ignore the details  Permeates software development programming languages are abstractions built on hardware.
Polymorphism, Inheritance Pt. 1 COMP 401, Fall 2014 Lecture 7 9/9/2014.
Effective Java: Generics Last Updated: Spring 2009.
CSC 211 Introduction to Design Patterns. Intro to the course Syllabus About the textbook – Read the introduction and Chapter 1 Good attendance is the.
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/
1 Java: AP Curriculum Focus and Java Subset Alyce Brady.
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.
Modern Software Development Using C#.NET Chapter 5: More Advanced Class Construction.
Object Based Programming Chapter 8. 2 In This Chapter We will learn about classes Garbage Collection Data Abstraction and encapsulation.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
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.
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
Object Oriented Software Development
Introduction to Design Patterns. Questions What is a design pattern? Who needs design patterns? How different are classes and objects in APL compared.
619 Final Review Last updated Spring 2008 © : Paul Ammann.
Chapter 14 Abstract Classes and Interfaces. Abstract Classes An abstract class extracts common features and functionality of a family of objects An abstract.
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.
Object Oriented Programming
Design Patterns Introduction
Introduction to Patterns. Introduction to Patterns Pattern: Webster definition of Pattern: Something regarded as a normative example to be copied.
Effective Java: Methods Common to All Objects SWE 619: Fall 2008 Paul Ammann.
COMP 121 Week 8: Generic Collections. Objectives To understand type variables and how they are used in generic programming To be able to implement and.
Application development with Java Lecture 21. Inheritance Subclasses Overriding Object class.
Introduction to Object-Oriented Programming Lesson 2.
COM S 228 Introduction to Data Structures Instructor: Ying Cai Department of Computer Science Iowa State University Office: Atanasoff.
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
PROGRAMMING PRE- AND POSTCONDITIONS, INVARIANTS AND METHOD CONTRACTS B MODULE 2: SOFTWARE SYSTEMS 13 NOVEMBER 2013.
(c) University of Washington06-1 CSC 143 Java Inheritance Tidbits.
© 2006 Pearson Addison-Wesley. All rights reserved 1-1 Chapter 1 Review of Java Fundamentals.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
CSC 243 – Java Programming, Spring, 2014 Week 4, Interfaces, Derived Classes, and Abstract Classes.
CSC 520 – Advanced Object Oriented Programming, Fall, 2010 Thursday, September 30 Week 5, Generics and Inheritance Techniques, Meyer Ch. 10 & 16.
Object Based Programming Chapter 8. 2 Contrast ____________________ Languages –Action oriented –Concentrate on writing ________________ –Data supports.
Introduction to CS/SWE 332
Chapter 10 Design Patterns.
Common Design Patterns
Type Abstraction SWE Spring 2009.
Functional Programming with Java
Object Based Programming
CSE 1030: Data Structure Mark Shtern.
Type Abstraction Liskov, Chapter 7.
Generic programming in Java
Introduction to CS/SWE 332
SWE 619 Software Construction Last Modified, Fall 2015 Paul Ammann
619 Final Review Last updated Spring 2010 © : Paul Ammann.
619 Final Review Fall 2017 Professor Ammann.
SWE 619 Last modified Fall 2007 Saket Kaushik, Paul Ammann
Type Abstraction SWE Spring 2013.
Presentation transcript:

619 Final Review Last updated Fall 2011 Paul Ammann

619 Final Review 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

619 Final Review 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

619 Final Review 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

619 Final Review 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

619 Final Review 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

619 Final Review 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

619 Final Review 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

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

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

619 Final Review Specifications (Liskov 9) Specificand Sets Generality vs. Restrictiveness Redundancy Definitions Examples Relevance to Type Abstraction Methods Rule

619 Final Review Design Patterns (Liskov 15) Introduction to Design Patterns Characterization of Patterns Name Problem Solution Consequences Example Patterns Factory, Singleton, Bridge, Decorator, Command, Iterator, State, Template

619 Final Review Creating and Destroying Objects (Bloch 2) Static Factories Builders vs. Parameterized Constructors Singletons Noninstantiability Unnecessary Object Creation Eliminate Obsolete References

619 Final Review 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

619 Final Review Classes and Interfaces (Bloch 4) Immutability Why it is Preferable How to Achieve Composition vs. Inheritance Why is Composition Preferable? Potential Problems for Inheritance Mechanisms to Prohibit Inheritance

619 Final Review 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

619 Final Review Enums and Annotations (Bloch 6) Using enums instead of int constants Using instance fields instead of ordinals Use EnumSet instead of bit fields Use EnumMap instead of ordinal indexing Emulate extensible enums with interfaces Prefer annotations to naming patterns Consistently use Override annotation Use marker interfaces to define types

619 Final Review Methods (Bloch 7) Parameter validity Defensive copies Method signature design Being careful with overloading Varargs Empty arrays/collections vs. null returns JavaDoc for exposed API

619 Final Review General Programming (Bloch 8) Variable Scope For-each contructs Library usage, primitives vs. boxed Strings vs. appropriate types Interface usage Beware pointless optimization Naming conventions

619 Final Review Concurrency (Bloch 10) Simple Thread Interactions Shared Access to Mutable Data Synchronized Methods Possible Executions in the Absence of Synchronization Roles for wait() and notify() Bloch’s Alien Method Examples

619 Final Review Specification Checking Specifications for Common Properties Temporal Logic for Specification Computational Tree Logic (CTL) Linear Temporal Logic (LTL) Simple Specification Patterns Kansas State University material Links on course schedule Huth and Ryan is also a excellent source Huth and Ryan

619 Final Review Secure Programming Introduction to Secure Implementation What is software NOT supposed to do? Bugs Misuse Cases Vulnerabilities/Exploits You need to think about the bad guy! Most vulnerabilities are simple mistakes YOUR software can be better

619 Final Review Special Topics JUnit What is JUnit How to use JUnit How to write tests in JUnit Contract model and JUnit Theories How to extract basic tests from a contract Cover each exceptional condition Cover “normal” behavior May require several tests

619 Final Review Wrap Up Final Exam Closed Book/Closed Notes But One (1) 8.5x11 sheet of paper, handwritten Covered Material Liskov: Chapters 1-9; 15 Bloch: Chapters 2-10 Plus special topics Temporal Logic, Parameterized Unit Test, Security Questions?