332 Final Review Last updated Fall 2013 Professor Ammann.

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming Lecture 3 Writing Java Applications, Java Development Tools.
Advertisements

Identity and Equality Based on material by Michael Ernst, University of Washington.
The Substitution Principle SWE 332 – Fall Liskov Substitution Principle In any client code, if subtype object is substituted for supertype object,
Composition CMSC 202. Code Reuse Effective software development relies on reusing existing code. Code reuse must be more than just copying code and changing.
Mutability SWE 332 Fall 2011 Paul Ammann. SWE 3322 Data Abstraction Operation Categories Creators Create objects of a data abstraction Producers Create.
CS 211 Inheritance AAA.
Georgia Institute of Technology Workshop for CS-AP Teachers Chapter 3 Advanced Object-Oriented Concepts.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
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.
Chapter 10 Classes Continued
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Chapter 6 Class Inheritance F Superclasses and Subclasses F Keywords: super F Overriding methods F The Object Class F Modifiers: protected, final and abstract.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
Recap (önemli noktaları yinelemek) from last week Paradigm Kay’s Description Intro to Objects Messages / Interconnections Information Hiding Classes Inheritance.
CORE JAVA
Sadegh Aliakbary Sharif University of Technology Fall 2012.
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.
APCS Java AB 2004 Review of CS1 and CS2 Review for AP test #1 Sources: 2003 Workshop notes from Chris Nevison (Colgate University) AP Study Guide to go.
Utilities (Part 2) Implementing static features 1.
Effective C#, Chapter 1: C# Language Elements Last Updated: Fall 2011.
Chapter 2 Introducing Interfaces Summary prepared by Kirk Scott.
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Object Based Programming Chapter 8. 2 In This Chapter We will learn about classes Garbage Collection Data Abstraction and encapsulation.
Design Model Lecture p6 T120B pavasario sem.
Types in programming languages1 What are types, and why do we need them?
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.
CS 151: Object-Oriented Design October 15 Class Meeting Department of Computer Science San Jose State University Fall 2013 Instructor: Ron Mak
90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 1: Introduction Data.
CIS 270—Application Development II Chapter 8—Classes and Objects: A Deeper Look.
1  lecture slides online
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
March 1, 2004CS WPI1 CS 509 Design of Software Systems Lecture #6 Monday, March 1, 2004.
PROGRAMMING PRE- AND POSTCONDITIONS, INVARIANTS AND METHOD CONTRACTS B MODULE 2: SOFTWARE SYSTEMS 13 NOVEMBER 2013.
Object-Oriented Design Concepts University of Sunderland.
1 C# - Inheritance and Polymorphism. 2 1.Inheritance 2.Implementing Inheritance in C# 3.Constructor calls in Inheritance 4.Protected Access Modifier 5.The.
Object-Oriented Programming “The Rest of the Story”, CS 4450 – Chapter 16.
1 Chapter 8 Class Inheritance and Interfaces F Superclasses and Subclasses  Keywords: super F Overriding methods  The Object Class  Modifiers: protected,
Mutability SWE 332 Fall 2015 Paul Ammann. SWE 3322 Data Abstraction Operation Categories Creators Create objects of a data abstraction Producers Create.
 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.
Object Based Programming Chapter 8. 2 Contrast ____________________ Languages –Action oriented –Concentrate on writing ________________ –Data supports.
Introduction to CS/SWE 332
About the Presentations
Type Abstraction SWE Spring 2009.
Abstraction Functions and Representation Invariants
Introduction to Data Structures
CSE 1030: Data Structure Mark Shtern.
Interfaces.
Type Abstraction Liskov, Chapter 7.
Introduction to CS/SWE 332
Effective Java, 3rd Edition Chapter 10: Exceptions
Method Verification CS/SWE 332 Paul Ammann.
619 Final Review Last updated Spring 2010 © : Paul Ammann.
619 Final Review Fall 2017 Professor Ammann.
Data Structures and Algorithms for Information Processing
COS 260 DAY 23 Tony Gauvin.
Fall 2018 CISC124 2/24/2019 CISC124 Quiz 1 marking is complete. Quiz average was about 40/60 or 67%. TAs are still grading assn 1. Assn 2 due this Friday,
COS 260 DAY 23 Tony Gauvin.
CS 112 Programming 2 Lecture 02 Abstract Classes & Interfaces (2)
Effective Java, Chapter 9: Exceptions
Type Abstraction SWE Spring 2013.
Inheritance Lakshmish Ramaswamy.
CS 240 – Advanced Programming Concepts
Method Verification Paul Ammann.
Presentation transcript:

332 Final Review Last updated Fall 2013 Professor Ammann

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

3 Basic Java; Some C++ and C# Basic Java reviewed Some C++ No specific final questions But be prepared to manipulate basic Java, C++ code Syntax isn’t the issue; concepts are

4 Exceptions How to program exceptions Java, C++ Rationale for exceptions Providing defined behavior Bloch Items Exceptions for exceptional conditions Checked vs. unchecked exceptions Standard exceptions Matching exceptions to the abstraction Failure Atomicity Ignoring Exceptions

5 JUnit and JavaDoc How to test and document Java programs Corresponding C++, C# facilities not covered in this class JavaDoc APIs JUnit tests for a given JavaDoc description JavaDoc and JUnit for exceptions Contract model and Junit JUnit theories

6 Contracts Fundamental Topic Expect Significant Exam Coverage Understanding, not Formality, is the Focus Method contracts Preconditions, Postconditions, Invariants Relation to JavaDoc Relation to JUnit Differences between Java and C++ Some preconditions relate to language type safety

7 Data Abstraction Abstraction Functions What they are How to implement (toString()) Representation Invariants What they are How to check Fair exam questions Identify abstract states wrt implementation states Identify states that satisfy/violate rep invariants Identify rep invariants that disallow certain states

8 Method Verification Verification of methods in isolation Representation invariant captures method interactions Two part verification Maintain representation invariant Show implementation satisfies contract Role of the abstraction function Relating implementation state to abstract state Fair exam question Given contract/code pair Will verification succeed? If not, why not?

9 Object Creation/Destruction Rules for Object creation Bloch Chapter 2 Static factories, constructors with many parameters Constructor chaining and it’s analogues Similar rules apply for cloning, serialization Access to uninitialized state See Bloch Item 17 C++ Constructors, copy constructors / copy assignment Object destruction Memory leak issues Inappropriate object destruction

10 Substitution Principle Core principle for inheritance Nuances of “IS-A” relationship Reasoning About Subtypes Signature Rule Rules for Exceptions Methods Rule Preconditions/Postconditions More Rules for Exceptions Relation to Method Verification Properties Rule

11 Substitution Principle and Methods Common to All Objects Understand the problem equals() Transitivity, Symmetry, Substitution for subtypes Bloch’s vs Wagner’s equals() recipe hashCode() Consistency with equals() Understand the solution Composition (Bloch Item 16) Understand Bloch’s InstrumentSet example

12 Mutability Key topic Should be comfortable designing immutable types Benefits - Bloch Item 15 Achievement Transforming mutators to producers Limiting subtyping Performance Controlling object instantiation

13 Generics Programming with Java generics Understand that they are really “ungenerics” Type safety aspects Java Generics (Bloch Chapter 5) Arrays vs. Lists Converting to generics PECS – producer extends, consumer super

14 General Programming Local variable scopes For/for-each/while loop guidelines Primitive/boxed type pitfalls Use of String type General overview of Native methods Reflection

15 Enums and Annotations Problems with C-Style Enums Enums, EnumSet, EnumMap Simple Annotations

16 Wrap Up Closed Book/Notes/Slides/Phone/Web/etc. Bring something to write with You may bring one (1) 8.5”x11” paper Your handwriting – no printing/photocopying Double-sided is fine Goal: Effective study aid Prepare with quizzes, in-class exercises At least one quiz question will be on final

17 More Wrap Up Grading issues (Blackboard) must be brought to my attention by the final exam Questions?