Vous êtes sur la page 1sur 62

Object Oriented Analysis

Unit: 300144; Level: 200; Credit Points 10

Unit Introduction
Dr. Quang Vinh Nguyen

Object Oriented Analysis, 300144

General Information
Object Orietend Analysis, 300144
Level 2 10 Credit Points

Assumed Knowledge
300585 System Analysis and Design or 300131 Introduction to Analysis and Design or Equivalent Have gained sufficient equivalent knowledge from the prerequisites to understand and master the concepts discussed and presented in this OOA unit. Have a general understanding of what an information system is and how information system development is undertaken. Comfortable in learning use of the modelling tools and report with some tutorial assistance such a Visio , Rationals ROSE, or Telelogics TauUML and Word and MS Project
Object Oriented Analysis, 300144 2

Staffs
Dr Quang Vinh Nguyen Unit Coordinator and Lecturer Phone: 4736 0482 Email: q.nguyen@uws.edu.au (preferred contact method) Room: Room Y-353, Bld Y, Penrith campus, Room , Hot Office, Parramatta campus Consultation hours: Wednesday 11:00 12:00 (Parramatta campus) Monday 11:00 12:00 (Penrith campus) Friday 10:00 11:00 (Penrith campus) Contact Details of the Tutors are available on vUWS

Object Oriented Analysis, 300144

Staffs
Mahmoud Elkhodr Lecturer and Tutor Email: m.elkhodr@uws.edu.au (preferred contact method) Room: Room UG-25, Bld U, Penrith campus, Consultation hours: TBA

Object Oriented Analysis, 300144

What will be Covered in this Unit


The concepts of Object Orientation including the fundamentals, processes and application of the concepts to practical modelling, Three modelling spaces: Problem, Solution and Background; Roles in Requirement Analysis, OO Analysis Techniques, as well as generic techniques such as Interviews, Workshops, Critical Requirement Analysis and Business Evaluation to arrive at high-level requirements and their prioritisation, Package diagrams and high-level slicing of packages as sub-systems, Quality Software & Business processes. Introduction and documenting Actors and Use Cases, Introduction to Use Case Diagrams, Use case Notations, Relationships, Analysis & Testing, Activity diagrams as mechanisms to document the flow of the system/use case Class Notations and definition of a class including attributes and operations, Documenting Class Diagram and Relationships between various classes such as Association and Inheritance, Documenting Sequence Diagrams and the persistence design with Class and Sequence Diagrams Major Ingredients and Creation of State Chart Diagrams, Prototypes and Operational (Non-Functional) Requirements including Performance, Scalability, Security & Volume, Quality assurance, management and testing aspects of a system, Emerging technologies and design

Object Oriented Analysis, 300144

How the Unit Run


4 Hours per week:
two hour lecture (not compulsory but strongly recommended for update announcement, latest materials, and workbook exercises) two hour practical (mandatory)

At least 6 hours self-study (on average) Lecture sessions


scheduled for 12 weeks no lecture at Mid-Term Test at Week 8

Practical sessions
scheduled for 11 weeks (only 10 marked tutorial sessions) no practical sessions in first week

Check Student Learning Guide for Further Detail

Object Oriented Analysis, 300144

Tutorial/Practical Exercises: 15% (Weekly performance and attendance)


Attendance and doing exercises in tutorials are mandatory There are 10 group-works (and/or exercises) for marking corresponding to 10 tutorial sessions. Attendance and tutorial performance are marked at the last 30 minutes at each tutorial session.

Assessment

Mid-term Test: 15%, 90 mins test including reading time (Closed book) is held in Week 8 or as specified in class, Group Assignment (also known as Project Work): 20%, OO Analysis Model in a CASE tool + Deliverables Report
Submission at the last week of the semester or as specified in class Students attend < 5 tutorials will receive 0 Score for the assignment.

Final Examination: 50%, 120 mins exam including reading time of 10 mins (Closed book).
Must obtain at least 40% in the final examination, and at least 50% as a total value of all your assessment scores to pass the unit
Object Oriented Analysis, 300144 7

Textbook and References


Textbook:
Unhelkar, B., Practical Object Oriented Analysis, 2005, Thomson Publishing; ISBN: 0170122980

References:
Unhelkar, B., Practical Object Oriented Design, 2005, Thomson Publishing; ISBN: 0170122999. The alternative book that discuss about the design perspectives. Fowler, M., UML Distilled, 3rd Edition, 2004, Addison-Wesley. ISBN: 0321193687. This is a good readable book and should be referred to in addition to the course material. Unhelkar, B., Process Quality Assurance for UML-based Projects, 2003, Boston : AddisonWesley . ISBN: 0201758210. This book contains detailed discussion on the process aspect of quality. Chapter 1 for UML-based models, Chapter 3 for relevant process components, and Chapter 6 for testing are quite relevant. Booch, G., et al, The UML User Guide, 2005, 2nd edition, Addison-Wesley, ISBN: 0321267974. This is a substantial text and should be occasionally referred to, when students (especially teams) are looking for additional and in-depth material on a particular topic. Brown, D., An Introduction to Object-Oriented Analysis: Objects and UML in Plain English, 2nd edition, 2002, New York: Wiley, ISBN: 0471371378. This book is a very general and accessible introduction to Object Oriented Analysis. It contains extensive pedagogy and incorporates patient explanations, making it ideal for beginners as a complement reading material.
Object Oriented Analysis, 300144 8

Textbook and References (cont)


References (cont):
Ian, G., O'Callaghan, A. and Wills, A. C., Object-Oriented Methods: Principles & Practice, 3rd edition, Addison-Wesley, 2001, ISBN: 020161913X. This book is very comprehensive and informative about Object Orientation. This is suitable for deep study students. George, J.F., Object-Oriented Systems Analysis and Design, 2nd editition, 2007, Pearson Prentice Hall, ISBN: 0132279002. This covers a variety topics in both OO analysis and design Garzas, J. and Piattini, M., Object-Oriented Design Knowledge: Principles, Heuristics, and Best Practices, 2007, Hershey, PA : Idea Group Pub, ISBN: 1591408962. This book is suitable for students who would like to learn more about the design perspective of OO. Weisfeld, M. A., The object-oriented thought process, 2009, Upper Saddle River, NJ: Addison-Wesley, ISBN: 9780672330162. This book covers the foundation in object-oriented concepts and then explains how various object technologies are used. O'Docherty, M., Object-Oriented Analysis and Design: Understanding System Development with UML 2.0, 2005, Hoboken, NJ : Wiley, ISBN: 0470092408. This book provides a thorough grounding in object-oriented analysis and design, providing authoritative and accessible coverage of object-oriented concepts, the software development process, UML and multi-tier technologies. Booch, G. et al., Object-Oriented Analysis and Design with Applications, 2007, AddisonWesley, ISBN: 020189551X. This book outlines object-oriented methods using the Unified Modeling Language 2.0 with real applications.
Object Oriented Analysis, 300144 9

Textbook and References (cont)


E-Book References (for further deep study)
Dennis, A. (2005). Systems analysis and design with UML version 2.0 an object-oriented approach (2nd ed.). Hoboken, NJ: Wiley. Douglass, B. P. (2007). Real time UML workshop for embedded systems. Burlington, Mass.: Elsevier. Larman, C. (2005). Applying UML and patterns: An introduction to object-oriented analysis and design and iterative development (3rd ed.). Upper Saddle River, N.J.: Prentice Hall Professional Technical Reference. ODocherty, M. (2005). Object-oriented analysis and design: Understanding system development with UML 2.0. Hoboken, NJ: Wiley. Samek, M. (2009). Practical UML statecharts in C/C++ event-driven programming for embedded systems (2nd ed.). Amsterdam; Boston Newnes/Elsevier.

Check the Unit page at vUWS for more update resources


Object Oriented Analysis, 300144 10

O-O-A Chapter 1
Fundamentals of Object Orientation

Object Oriented Analysis, 300144

11

Module Outline
Positioning Object Oriented Analysis Fundamentals of ObjectOrientation 1. Classification 2. Encapsulation 3. Abstraction 4. Inheritance 5. Polymorphism The need of Modeling Unified modeling language Mapping the UML to the Modeling Spaces
Object Oriented Analysis, 300144 12

What is Object-Oriented?
Encompasses various aspects of software Development
Analysis; Design; Implementation; Testing; Metrics; Databases; Architecture - especially Distributed; Management;

Unlike Relational (set) Theory, has no Mathematical background; hence no Precise Definition;

Object Oriented Analysis, 300144

13

Some Possible Definitions


A good software engineering practice that attempts to address new IT challenges A good approach to build complex and rapidly changing software applications in the new millennium - Therefore, may apply to any software Development
Require a different way of thinking about decomposition, and it produces software architectures that are largely outside the realm of the structured design culture
Object Oriented Analysis, 300144 14

Software is inherently complex


The complexity of the problem domain
Raw functionality, nonfunctional requirements, e.g. usability, performance, cost, reliability, security, etc. Communication gap between the users and the developers Changes during the development Whats else?

The difficulty of managing the development process


Object Oriented Analysis, 300144 15

Software is inherently complex


The difficulty of managing the development process
How much line codes do we normally have for a program? Your program? < 100 lines First MS DOS Operating System? 100 kbs Windows XP Operating System? hundreds of Mbs Windows 7 ? Gbytes modern software can have millions of line codes and/or hundreds of modules and components
Object Oriented Analysis, 300144

(cont)

16

Software is inherently complex


The flexibility possible through software
Software is required to have high flexibility

(cont)

The problems of characterising the behaviour of discrete systems


Difficult to know exactly the behaviour with a system with hundreds or even thousands of variables

Object Oriented Analysis, 300144

17

Why Object-Oriented
OO Software Engineering results in easier maintainability and extensibility
Due to Localized and controlled changes

OO Software Engineering results in more Opportunities for Reuse


Code, Design (including Patterns and Frameworks), Requirements (Use cases), Components (Link time and Run time)

The key benefit of OO approach is: hierarchically breaking down a complex system into manageable components Object Oriented Analysis, 300144

18

Why Object-Oriented Analysis


OOA is now well beyond the experimental stage and OOA has entered the mainstream of information systems development Accelerated by
The success and rapid spread of object-oriented programming Recognition that object-oriented methods produce more effective, efficient, flexible and stable information systems

Object Oriented Analysis, 300144

19

Positioning Objects within the Evolving Technical Thinking


2000s
Account Customer

1990s 1980s

Booch etc. to Unified Modeling Language

Entity-Relationships; Data Flows; Flowcharts; SSADM


Object Oriented Analysis, 300144 20

1970s

Programming Language History


Mathematical Expressions
Procedure Programming Languages OO Programming Languages

Higher Languages Web-Services

Object Oriented Analysis, 300144

21

Object-Oriented (O-O) Programming


Program Program Program Program
Class

Function Code

Function Code

Class
Function Function

Class
Function Function

Code

Code

Code
Statement Control Loop Jump
Function Function Code Code Code Code

Class
Function Function

Class
Function Function

Component Component Class Component Class Component Class Class Class Class Class Class

Assembly
Dr. Quang Vinh Nguyen

Procedure Object-Oriented Business-Oriented? Component-Oriented?


School of Computing and Maths 22

Positioning Objects
In 1970s Flowchart and Structured System Analysis and Design Methods In 1980s Chens popular Entity Relationship and Data Flow diagrams Early 1990s Unified Modeling Language by Booch.

Object Oriented Analysis, 300144

23

Object Orientation; Basis for Web Services and Globalisation


ObjectOrientation (Components)

Global Business

+
Distributed Computing

Global information systems

Web-Services Based Global IT Management Internet Technologies


Object Oriented Analysis, 300144 24

Learning and Adopting Object Orientation


Modeling (UML Standard)

Fundamentals

Adopting OO

Process

Experience
Object Oriented Analysis, 300144 25

Sub-Module Fundamentals of Object Orientation


Basic Concepts

Object Oriented Analysis, 300144

26

Classes and Objects

A CLOCK in general is a CLASS. Your CLOCK and My CLOCK are specific Objects

Object Oriented Analysis, 300144

27

What is a Class?
A Class is a DEFINITION, a TEMPLATE, for the Objects NOTE: A Class is NOT a Collection of Objects; A class is not an individual object, but it represents a whole set of objects.

Object Oriented Analysis, 300144

28

What is an Object?
An Entity with crisply defined boundaries A physical or conceptual thing in the problem and the solution domain Identity is a unique identifier of an object Has attributes that describe the object, and also describe the state in which it exists Has behavior that is manifested in changes to the state of the object Sends and receives messages
Object Oriented Analysis, 300144 29

What is an Object? (cont)


List the attributes and behaviours of the Human Object?

Object Oriented Analysis, 300144

30

Objects vs Classes ?
Object 1 Object 7 Object 2 Object 6 Object 5 Object 4 Object 3

Class: Car
A class represents a set of objects that share a common structure and a common behaviour
An object is simply an instance of a class
Object Oriented Analysis, 300144 31

OO v/s Non-OO (Similarities and Differences)


Non-Object-oriented (Traditional)
Data and Procedures are kept Separate Procedures work on Data to produce results

Data

Procedures

Data

Subprograms

Object Oriented Analysis, 300144

32

OO v/s Non-OO (Similarities and Differences)


Object-oriented
Focus on Responsibilities - to be satisfied by Objects Responsibilities translate into Data and Functions within an Object

Data
Procedures

Object Oriented Analysis, 300144

33

Comparing the Mindsets


(Henderson-Sellers, Book of OO Knowledge, Prentice-Hall)

Procedural Mindset What is the system supposed to do? What are the functions of the system? How do I design and code to achieve the functions? Focus is on the algorithms.

Object Oriented Analysis, 300144

OO Mindset What is the system made up of? Objects What are the responsibilities of these objects? How will these objects collaborate to satisfy the responsibilities? Algorithms/code deferred

34

The Star of OO Fundamentals


CLASSIFICATION

Fundamentals of Object-Orientation: THE OBJECT

Object Oriented Analysis, 300144

35

Classification

Lithops Lesliei

Object Oriented Analysis, 300144

36

Classification
Starting point of object orientation Grouping meaningful objects. Classification is based on the requirements appearing in the problem space.

Object Oriented Analysis, 300144

37

Abstraction: 1st Level is from Objects to Class

FROG HAT CLOCK CAT Note that these are ABSTRACTIONS and not real Objects. Objects are Classified and good Classification leads to creation of good Abstractions. Classes that represent a collection of Objects are Abstract.

Object Oriented Analysis, 300144

38

Abstraction: 2nd Level is from Classes to Classes


FROG
Can be Abstracted to ANIMAL

CAT

CLOCK Can be Abstracted to HAT THING

Classes are abstracted to higher level class


Object Oriented Analysis, 300144 39

Classification & Abstraction


MAN BOOK

Requirements from Problem Space Can be Classified & Abstracted to Arrive at Good Classes

CHEST
SHOE HAT

Object Oriented Analysis, 300144

40

Abstraction (and Classification) (cont)


Starts by grouping a given set of (reality) Objects based on certain characteristics Example: Marker Pens, Ballpoint Pens etc. From the classification (grouping), most common properties and behavior is abstracted to arrive at a Class definition Infinite number of objects can then be created (instantiated) from this Class

Object Oriented Analysis, 300144

41

Identifying more general groupings to create Inheritance Hierarchy


LIVING BIRD and ANIMAL are types of LIVING things
MITHU? (my Bird) PUSPUS? (your Cat) Are Objects; They Dont appear on Class diagrams

BIRD

ANIMAL

CRANE

FROG
Object Oriented Analysis, 300144

CAT
42

Inheritance
Inheritance in OO is the ability of a Class to inherit all attributes and behavior of a higher-level class Classifying with optimum granularity also leads to good inheritance structure

Object Oriented Analysis, 300144

43

Inheritance (cont)
Child class inherits from parent class Child class shares the attributes and routines of parent class, plus perhaps adds additional features Child class can change implementation of parent class features multiple inheritance is permitted; some resolution for name clashes is required
Object Oriented Analysis, 300144 44

Moving on the Inheritance Tree


Finding Superclasses
Needs abstract thinking Domain knowledge helpful Essentially FOR Reuse

Generalization

Finding Subclasses
Concrete lower level implementation thinking Essentially WITH Reuse

Specialization
45

Object Oriented Analysis, 300144

Encapsulation
Encapsulation means DATA is accessed only by METHODS
METHODS DATA (Attributes with States)
BEGIN PUBLIC VISIBILITY PRIVATE INFORMATION

CODE

END

Object Oriented Analysis, 300144

46

Modularity (and Encapsulation) (cont)


When attributes of an Object are NOT accessed directly by any other Object within the system but only through the public interface of the Object, it is Encapsulation Objects are modularized to handle complexity, and encapsulation enhances the advantages by localizing changes to within the objects

Object Oriented Analysis, 300144

47

Polymorphism
ANIMAL (move)

(move)
On Receipt of Message move from a Calling Object, the appropriate move - depending on whether it is a Frog or a Horse - will be executed

FROG (move)

HORSE (move)

CAT (move)

Advantage? CALLING object need not know what is Moved, so, if a new CAT object is added, the CALLING class doesnt change
Object Oriented Analysis, 300144 48

Polymorphism..
Essentially the ability of an Entity to behave differently - even after receiving the same message Translates to the ability of the software to substitute different Objects at runtime Implemented via Inheritance in Objectorientation
Object Oriented Analysis, 300144 49

Sub-Module The Need of Modelling


Software Development Layers

Object Oriented Analysis, 300144

50

Purpose of Modelling: Understand and Create Reality


(based on Unhelkar, B., 1999, 2003)
Understand Reality

MODEL
Create Reality

REALITY

Object Oriented Analysis, 300144

51

Modelling and Conceptual Software Development Layers (Place of UML)


UML only deals with Modeling. It is NOT a Methodology (or a Process) Quality Environment
Overall Management

Methodologies Modeling Languages, Databases

Management; Processes

Communication Technology

Object Oriented Analysis, 300144

52

Software Development Layers and Corresponding CASE TOOL Layer


QSP; Process Continuum; Bpwin etc.

RUP, OPEN, MeNtOR

TauG2; ROSE, Visio. Java, C++, XML, Oracle etc.

Object Oriented Analysis, 300144

53

OO Models have a Small Semantic Gap (from Unhelkar, CRC Press, 1999)
Passenger
ANALYSIS

Flight

Seat

SEMANTIC GAP

DESIGN

Class:: Passenger

Class:: Flight

Class:: Seat

Object Oriented Analysis, 300144

54

OO facilitates Seamless Transition from Problem to Solution Space (from Unhelkar, CRC Press, 1999)

Class Passenger Analysis (MOPS)

Class Flight

Class Seat

Design (MOSS)

Class Class Booking Priority

Implementation (MOSS)
Object Oriented Analysis, 300144 55

Sub-Module
Modeling Spaces
And Relating them to the UML

Object Oriented Analysis, 300144

56

Modelling Spaces and Roles in Analysis, Design and Architecture


(A rough role-based guideline)
Project Quality Manager Manager Architect

Model Of Problem Space (MOPS)

User Business Analyst

Understand Problem with Analysis

Model Of Background Space (MOBS)

Create Solution with Design


Model Of Solution Space (MOSS)

ARCHITECT: Apply Constraints With Architecture


System Designer

Object Oriented Analysis, 300144

57

Next Lecture
About the UML
Origins and Evolution of the UML Evolution of the UML

The UML Today


Visualizing, Specifying, Construction and Documenting

Some UML based projects Introduction to UML 2.0 UML 2.0 diagrams and purpose
Object Oriented Analysis, 300144 58

Workbook
Exercises
For Classroom

Object Oriented Analysis, 300144

59

Workbook Exercises
1. 2. 3. 4. 5. What is object orientation? What does it encompass? How is object orientation different from procedural approach to software development? What are the four major factors in learning and adopting object orientation? List FIVE objects from your current surroundings. Create at least TWO classes from the above five objects (This will help you understand the difference between a class and an object).
Object Oriented Analysis, 300144 60

Workbook Exercises
6. List next to each of the above TWO classes, at least FIVE attributes. 7. Discuss the importance of each of the fundamentals of OO within the context of software engineering. 8. What is a process and how it is different from modeling? 9. What are the two main reasons for creating models? 10. How is object-oriented modeling advantageous? 11. Name the three modeling spaces in OO modeling. Discuss the advantage of modeling in each of these three modeling spaces.
Object Oriented Analysis, 300144 61

Conclusions
Software Development benefits with Process and Modeling; UML is OMGs standard for Modeling; OO has Five Fundamentals Classification; Abstraction; Inheritance; Encapsulation and Polymorphism Class is a Template; Object is an Instance; All Modeling Work happens in 3 Spaces: MOPS; MOSS; and MOBS

Object Oriented Analysis, 300144

62

Vous aimerez peut-être aussi