Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Introduction to Object Technology.

Slides:



Advertisements
Similar presentations
1 OBJECT-ORIENTED CONCEPTS. 2 What is an object?  An object is a software entity that mirrors the real world in some way.  A software object in OOP.
Advertisements

Informática II Prof. Dr. Gustavo Patiño MJ
Mastering Object-Oriented Analysis and Design with UML Module 2: Concepts of Object Orientation.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
Object-Oriented Analysis and Design
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
Object Oriented Analysis and Design Using the UML
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
BACS 287 Basics of Object-Oriented Programming 1.
The chapter will address the following questions:
OOAD Using the UML - Introduction to Object Orientation, v 4.2 Copyright  Rational Software, all rights reserved 1 Object Oriented Analysis.
Introduction To System Analysis and design
Systems Analysis and Design in a Changing World, Fifth Edition
Object Oriented Analysis and Design Using the UML Version 4.2 Introduction to Object Orientation Prepared by:Kandarp R. Somaiya.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
BCS 2143 Introduction to Object Oriented and Software Development.
Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Use-Case Design.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 18. Review User interface Design principles Design Guidelines.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Unified Modeling Language, Version 2.0
3rd Country Training, K.Subieta: System Engineering and Databases. Lecture 3, Slide 1 February 20, 2004 Lecture 3: Introduction to Software Analysis and.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
1 Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Chapter 2: Object Basics Object-Oriented Systems Development Using the Unified Modeling.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 02. Objects,
Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Requirements Overview.
EC-241 Object-Oriented Programming LECTURE 9. Objectives: Introduction to Object Oriented Design Revise the basic principles of object orientation Unified.
Object Oriented Analysis & Design Using UML (CS-512) M-Tech CSE (Ist & 3rd Sem) Part Time Mr. Pawan Luthra Assistant Professor (CSE Deptt.) SBSSTC, Ferozepur.
Kal Bugrara, Ph.DSoftware Engineering Northeastern University Fundamentals Of Software Engineering Lecture V.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
OOAD Using the UML - Introduction to Object Orientation, v 4.2 Copyright  Rational Software, all rights reserved 1 Object Oriented Analysis.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 01. Concepts.
1 Unified Modeling Language, Version 2.0 Chapter 2.
1 IBM Software Group ® Essentials of Visual Modeling with UML 2.0 Module 7: Other UML Diagrams.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
Business Applications with Object-Oriented Paradigm (Modeling Concepts) Professor Chen School of Business Gonzaga University Spokane, WA
Object Oriented Analysis and Design Using the UML
1 IBM Software Group ® Essentials of Visual Modeling with UML 2.0 Module 3: Concepts of Object Orientation.
Didik Dwi h t t p : / / b l o g. e l e k t r o. u m. a c. i d / d i d i k Object Oriented Software Engineering.
Lecture 2: Review of Object Orientation. © Lethbridge/La ganière 2005 Chapter 2: Review of Object Orientation What is Object Orientation? Procedural.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Fundamentals of Visual Modeling with UML Module 1: Introduction to Object Technology.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
Concepts of Object Orientation lecture 1 –b. Objectives: Concepts of Object Orientation OOAD 2  Explain the basic principles of object orientation 
Modeling Your Application, Data or Service Creating Your UML Model.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Object Oriented Programming
Object-Oriented Modeling
The Movement To Objects
Systems Analysis and Design
Object-Oriented Analysis and Design
Concepts of Object Orientation
Systems Analysis and Design With UML 2
Today’s Objectives Define the Problem Domain
UML Class Diagrams: Basic Concepts
Object Oriented Analysis and Design Using the UML
Chapter 20 Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
ITEC 3220A Using and Designing Database Systems
Appendix A Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Presentation transcript:

Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Introduction to Object Technology

Object Oriented Analysis and Design 2 Outline  Introduction to object technology  Concepts of Object Orientation

Object Oriented Analysis and Design 3 What Is Object Technology?  A set of principles (abstraction, encapsulation, polymorphism) guiding software construction, together with languages, databases, and other tools that support those principles. (Object Technology - A Manager’s Guide, Taylor, 1997.)

Object Oriented Analysis and Design 4 The Strengths of Object Technology  Reflects a single paradigm  Facilitates architectural and code reuse  Reflects real world models more closely  Encourages stability  Is adaptive to change

Object Oriented Analysis and Design 5  Major object technology milestones Simula 1967 C ++ Late 1980s Smalltalk 1972 Java 1991 UML 1996 MDA 2003 The History of Object Technology ??? Future

Object Oriented Analysis and Design 6 Where Is Object Technology Used?  Client/Server Systems and Web Development  Object technology allows companies to encapsulate business information in objects and helps to distribute processing across the Internet or a network.

Object Oriented Analysis and Design 7 Where Is Object Technology Used? (cont.)  Real-time systems  Object technology enables real-time systems to be developed with higher quality and flexibility.

Object Oriented Analysis and Design 8 Differences Between OO and Structured Design  Object-orientation (OO)  Melds the data and data flow process together early in the lifecycle  Has a high level of encapsulation  Promotes reuse of code differently  Permits more software extensibility

Object Oriented Analysis and Design 9 Outline  Introduction to object technology  Concepts of Object Orientation  What is an object?  Four principles of OO  What is a class?  Polymorphism and generalization  Organizing model elements

Object Oriented Analysis and Design 10 Truck Chemical Process Linked List What Is an Object?  Informally, an object represents an entity, either physical, conceptual, or software.  Physical entity  Conceptual entity  Software entity

Object Oriented Analysis and Design 11 A More Formal Definition  An object is an entity with a well-defined boundary and identity that encapsulates state and behavior.  State is represented by attributes and relationships.  Behavior is represented by operations, methods, and state machines. Object Operations Attributes

Object Oriented Analysis and Design 12 An Object Has State  State is a condition or situation during the life of an object, which satisfies some condition, performs some activity, or waits for some event.  The state of an object normally changes over time. Name: J Clark Employee ID: Date Hired: July 25, 1991 Status: Tenured Discipline: Finance Maximum Course Load: 3 classes Name: J Clark Employee ID: HireDate: 07/25/1991 Status: Tenured Discipline: Finance MaxLoad: 3 Professor Clark

Object Oriented Analysis and Design 13 An Object Has Behavior  Behavior determines how an object acts and reacts.  The visible behavior of an object is modeled by a set of messages it can respond to (operations that the object can perform). Professor Clark’s behavior Submit Final Grades Accept Course Offering Take Sabbatical Maximum Course Load: 3 classes Subm itFinalGrades() AcceptCourseOffering() TakeSabbatical() Professor Clark SetMaxLoad()

Object Oriented Analysis and Design 14 An Object Has Identity  Each object has a unique identity, even if the state is identical to that of another object. Professor “J Clark” teaches Biology

Object Oriented Analysis and Design 15 Basic Principles of Object Orientation Abstraction Hierarchy Object Orientation Encapsulation Modularity

Object Oriented Analysis and Design 16 What Is Abstraction?  The essential characteristics of an entity that distinguishes it from all other kinds of entities.  Defines a boundary relative to the perspective of the viewer.  Is not a concrete manifestation, denotes the ideal essence of something.

Object Oriented Analysis and Design 17 Example: Abstraction StudentProfessor Course Offering (9:00 a.m., Monday-Wednesday-Friday) Course (e.g. Algebra)

Object Oriented Analysis and Design 18 What Is Encapsulation? Improves Resiliency  Hides implementation from clients.  Clients depend on interface.

Object Oriented Analysis and Design 19 Encapsulation Illustrated  Professor Clark needs to be able to teach four classes in the next semester. SubmitFinalGrades() AcceptCourseOffering() TakeSabbatical() Professor Clark SetMaxLoad() Name: J Clark Employee ID: HireDate: 07/25/1991 Status: Tenured Discipline: Finance MaxLoad:4 SetMaxLoad(4)

Object Oriented Analysis and Design 20 What Is Modularity?  Breaks up something complex into manageable pieces.  Helps people understand complex systems.

Object Oriented Analysis and Design 21 Example: Modularity  For example, break complex systems into smaller modules. Billing System Course Registration System Course Catalog System Student Management System

Object Oriented Analysis and Design 22 What Is Hierarchy? Decreasing abstraction Increasing abstraction Asset RealEstate Savings BankAccount CheckingStock Security Bond Elements at the same level of the hierarchy should be at the same level of abstraction.

Object Oriented Analysis and Design 23 Representing Objects in the UML  An object is represented as a rectangle with an underlined name. J Clark : Professor : Professor Named Object Anonymous Object Professor J Clark

Object Oriented Analysis and Design 24 What Is a Class?  A class is a description of a set of objects that share the same attributes, operations, relationships, and semantics.  An object is an instance of a class.  A class is an abstraction in that it  Emphasizes relevant characteristics.  Suppresses other characteristics.

Object Oriented Analysis and Design 25 A Sample Class Class Course Properties Name Location Days offered Credit hours Start time End time Behavior Add a student Delete a student Get course roster Determine if it is full

Object Oriented Analysis and Design 26 Representing Classes in the UML  A class is represented using a rectangle with compartments. Professor J Clark

Object Oriented Analysis and Design 27 Class Compartments  A class has three sections:  The class name  The structure (attributes)  The behavior (operations)

Object Oriented Analysis and Design 28 The Relationship between Classes and Objects  A class is an abstract definition of an object.  It defines the structure and behavior of each object in the class.  It serves as a template for creating objects.  Classes are not collections of objects. Professor Professor Meijer Professor Torpie Professor Allen

Object Oriented Analysis and Design 29 What Is an Attribute?  An attribute is a named property of a class that describes the range of values that instances of the property may hold.  A class may have any number of attributes or no attributes at all. Attributes

Object Oriented Analysis and Design 30 Attributes in Classes and Objects name: D. Hatcher address: 456 Oak studentID: 2 dateofBirth: 12/11/1969 name: M. Modano address: 123 Main studentID: 9 dateofBirth: 03/10/1967 Class Objects Student - name - address - studentID - dateOfBirth

Object Oriented Analysis and Design 31 What Is an Operation?  A service that can be requested from an object to effect behavior. An operation has a signature, which may restrict the actual parameters that are possible.  A class may have any number of operations or none at all. Operations Student + get tuition() + add schedule() + get schedule() + delete schedule() + has prerequisites()

Object Oriented Analysis and Design 32 What Is Polymorphism?  The ability to hide many different implementations behind a single interface. Manufacturer A Manufacturer B Manufacturer C OO Principle: Encapsulation

Object Oriented Analysis and Design 33 Example: Polymorphism StockBondMutual Fund getCurrentValue() financialInstrument.getCurrentValue() getCurrentValue()

Object Oriented Analysis and Design 34 What Is Generalization?  A relationship among classes where one class shares the structure and/or behavior of one or more classes.  Defines a hierarchy of abstractions in which a subclass inherits from one or more superclasses.  Single inheritance.  Multiple inheritance.  Is an “is a kind of” relationship.

Object Oriented Analysis and Design 35 Example: Single Inheritance  One class inherits from another. Checking Savings Superclass (parent) Subclasses (children) Generalization Relationship Ancestor Descendent

Object Oriented Analysis and Design 36 Example: Multiple Inheritance  A class can inherit from several other classes. Use multiple inheritance only when needed and always with caution! FlyingThingAnimal HorseWolfBirdHelicopterAirplane Multiple Inheritance

Object Oriented Analysis and Design 37 What Is Inherited? Inheritance leverages the similarities among classes.  A subclass inherits its parent’s attributes, operations, and relationships.  A subclass may:  Add additional attributes, operations, relationships.  Redefine inherited operations. (Use caution!)  Common attributes, operations, and/or relationships are shown at the highest applicable level in the hierarchy.

Object Oriented Analysis and Design 38  A general purpose mechanism for organizing elements into groups.  A model element that can contain other model elements.  A package can be used:  To organize the model under development.  As a unit of configuration management. What Is a Package? University Artifacts

Object Oriented Analysis and Design 39 A Package Can Contain Classes  The package, University Artifacts, contains one package and five classes. University Artifacts CourseOffering Schedule Professor Course Student Artifacts