Upload
alexina-freeman
View
216
Download
1
Embed Size (px)
Citation preview
Software EngineeringSoftware Engineering
- Mr. Ahmad Al-Ghoul- Mr. Ahmad Al-Ghoul
22
Learning ObjectivesLearning Objectives
Explain relationships among Explain relationships among objects and the concept of objects and the concept of inheritanceinheritance
Explain an object relationship Explain an object relationship diagramdiagram
Describe Unified Modeling Describe Unified Modeling Language (UML) tools and Language (UML) tools and techniques, including use cases techniques, including use cases and use case diagramsand use case diagrams
33
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
RelationshipsRelationships Enables objects to communicate and interact as they Enables objects to communicate and interact as they
perform business functions and transactions required by perform business functions and transactions required by the systemthe system
Relationships describe what objects need to know about Relationships describe what objects need to know about each othereach other
Relationships describe how objects respond to changes Relationships describe how objects respond to changes in other objectsin other objects
Relationship describe the effects of membership in Relationship describe the effects of membership in classes, super-classes, and subclassesclasses, super-classes, and subclasses
Inheritance enables an object, called a child, to derive Inheritance enables an object, called a child, to derive one or more of its attributes from anther object, called a one or more of its attributes from anther object, called a parentparent
A child object, however, may have additional attributesA child object, however, may have additional attributes The inherited attributes from the parent object do not The inherited attributes from the parent object do not
need to be repeated in the child objectneed to be repeated in the child object
44
Object-Oriented analysis and Object-Oriented analysis and design using UML [1]design using UML [1]
An inheritance relationship exists between the INSTRUCTOR and EMPLOYEE objects. The INSTRUCTOR (child) object inherits characteristics from the EMPLOYEE (parent) class and can have additional attributes of its own.
55
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
Relationships Among Objects and Relationships Among Objects and ClassesClasses
Object Relationship DiagramObject Relationship Diagram After you identify the objects, classes, and After you identify the objects, classes, and
relationships, you are ready to prepare an relationships, you are ready to prepare an object relationship diagram that will object relationship diagram that will provide an overview of the systemprovide an overview of the system
You will use that model as a guide as you You will use that model as a guide as you continue to develop additional diagrams continue to develop additional diagrams and documentationand documentation
66
Object-Oriented analysis and design using UML [1]Object-Oriented analysis and design using UML [1]
Object relationship diagram for the fitness center.Notice that the model shows the objects and how they interact to perform business functions and transactions
77
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
Object Modeling with the Unified Object Modeling with the Unified Modeling LanguageModeling Language The UML uses a set of symbols to represent The UML uses a set of symbols to represent
graphically the various components and graphically the various components and relationships within a systemrelationships within a system
although the UML can be used for business although the UML can be used for business process modeling and requirements process modeling and requirements modeling, it mainly is used to support modeling, it mainly is used to support object-oriented system analysis and to object-oriented system analysis and to develop object modelsdevelop object models
88
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
Use case modelingUse case modeling Use CaseUse Case
A use case represents the steps in a specific A use case represents the steps in a specific business function or processbusiness function or process
A use case is a complete sequence of A use case is a complete sequence of related actions initiated by an actorrelated actions initiated by an actor
An external entity called an actor, An external entity called an actor, initiates a use case by requesting the initiates a use case by requesting the system to perform a function or processsystem to perform a function or process
99
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
An actor is someone or something that is An actor is someone or something that is external to the system, but that is going external to the system, but that is going to interact with the system.to interact with the system.
Actors are represented as stick figures.Actors are represented as stick figures. Action or event represents by an oval with Action or event represents by an oval with
a label that describes the action or eventa label that describes the action or event The line from the actor to the use case is The line from the actor to the use case is
called an associationcalled an association
1010
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
Use Case DiagramsUse Case Diagrams Applied to analyze functional Applied to analyze functional
requirements of the systemrequirements of the system Performed during the analysis phase to Performed during the analysis phase to
help developers understand functional help developers understand functional requirements of the system without requirements of the system without regard for implementation detailsregard for implementation details
1111
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
Use Case DiagramsUse Case Diagrams Use case diagrams are created to visualize the Use case diagrams are created to visualize the
relationships between actors and use casesrelationships between actors and use cases A use case diagram is a summary of several A use case diagram is a summary of several
related use cases within a system or related use cases within a system or subsystemsubsystem
Use cases represent complete functionality of Use cases represent complete functionality of the systemthe system
To create a use cases, you start reviewing the To create a use cases, you start reviewing the information that you gathered during the information that you gathered during the requirements modelling phaserequirements modelling phase
Identify the actors and the functions or Identify the actors and the functions or transactions they initiate for each use casetransactions they initiate for each use case
Develop a use case description in the form of a Develop a use case description in the form of a tabletable
1212
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
Use case descriptionUse case description A use case description documents the name of A use case description documents the name of
the use casethe use case Names of the actorsNames of the actors A description of the use caseA description of the use case A step by step list of the tasks and actions A step by step list of the tasks and actions
required for successful completionrequired for successful completion A description of alternative causes of actionA description of alternative causes of action PreconditionsPreconditions Post conditionsPost conditions assumptionsassumptions
1313
Object-Oriented analysis and design using UML [1]Object-Oriented analysis and design using UML [1]
The ADD NEW STUDENT use case description documents the process used to add a current student into an existing class.
1414
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
Steps to create a use case diagramSteps to create a use case diagram Identify the system boundary, which is Identify the system boundary, which is
represented by a rectanglerepresented by a rectangle Place the use cases on the diagram Place the use cases on the diagram Add the actorsAdd the actors Show the relationshipsShow the relationships
1515
Object-Oriented analysis and Object-Oriented analysis and design using UMLdesign using UML
Relationships Between Use CasesRelationships Between Use Cases Use cases may participate in Use cases may participate in
relationships with other use-casesrelationships with other use-cases Two typesTwo types
ExtendsExtends Adds new behaviors or actions to a use caseAdds new behaviors or actions to a use case
IncludeInclude One use case references another use caseOne use case references another use case
1616
Object-Oriented analysis and design using UML [1]Object-Oriented analysis and design using UML [1]
The figure shows a use The figure shows a use case diagram for an case diagram for an auto service department auto service department which involves which involves customers, service customers, service writers who prepare writers who prepare works orders and works orders and invoice, and mechanics invoice, and mechanics who perform the work.who perform the work.
the customer actor the customer actor initiates the use case by initiates the use case by requests service.requests service.
1717
Sequence SummarySequence Summary After you identify the objects, classes, and After you identify the objects, classes, and
relationship, you prepare an object relationship relationship, you prepare an object relationship diagram that shows the objects and how they diagram that shows the objects and how they interact to perform business functions and interact to perform business functions and transactionstransactions
Inheritance enables an object, called a child, to Inheritance enables an object, called a child, to derive one or more of its attributes from anther derive one or more of its attributes from anther object, called a parentobject, called a parent
UML techniques include use cases and use case UML techniques include use cases and use case diagramsdiagrams
A use case describes a business situation initiated A use case describes a business situation initiated by an actor, who interacts with the information by an actor, who interacts with the information systemsystem
Each use case represents a specific transaction, or Each use case represents a specific transaction, or scenarioscenario
A use case diagram is a visual summary of related A use case diagram is a visual summary of related use cases within a system or subsystemuse cases within a system or subsystem
1818
Sequence SummarySequence Summary In this Sequence we haveIn this Sequence we have
Described how to draw Described how to draw an object an object relationship diagram that shows the relationship diagram that shows the objects and how they interact to perform objects and how they interact to perform business functions and transactionsbusiness functions and transactions
Defined the term inheritanceDefined the term inheritance Explained use case that describes a Explained use case that describes a
business situation initiated by an actor, business situation initiated by an actor, who interacts with the information systemwho interacts with the information system
Explained use case diagram and Explained use case diagram and described how to draw itdescribed how to draw it
1919
ReferenceReference
[1] System Analysis and Design, Sixth Edition[1] System Analysis and Design, Sixth Edition Authors: Gary B. Shelly, Thomas J. Cashman and Harry J. Authors: Gary B. Shelly, Thomas J. Cashman and Harry J.
Rosenblatt , Rosenblatt , Publisher: SHELLY CASHMAN SEWIES.Publisher: SHELLY CASHMAN SEWIES.
[2] system analysis and design, sixth edition[2] system analysis and design, sixth edition Authors: Kenneth E. Kendall and Julie E. KendallAuthors: Kenneth E. Kendall and Julie E. Kendall Publisher: Prentice HallPublisher: Prentice Hall
[3] Modern Systems Analysis and Design Third Edition[3] Modern Systems Analysis and Design Third Edition Authors: Jeffrey A. Hoffer , Joey F. George, Joseph S. Authors: Jeffrey A. Hoffer , Joey F. George, Joseph S.
ValacichValacich Publisher: prentice hall Publisher: prentice hall