Object Oriented Systems Analysis and Design Using
[ad_1]
Learning Objectives
•
Understand what object oriented systems analysis
and design is and appreciate its usefulness
•
Comprehend the concepts of unified modeling
language (UML), the standard approach for modeling
a system in the object oriented world
•
Apply the steps used in UML to break down the
system into a use case model and then a class model
•
Diagram systems with the UML toolset so they can be
described and properly designed
•
Document and communicate the newly modeled
object oriented system to users and other analysts
3
Object
Object–Oriented Analysis and Oriented Analysis and DesignDesign
•
•Works well in situations where Works well in situations where complicated systems are undergoing complicated systems are undergoing continuous maintenance, adaptation, continuous maintenance, adaptation, and designand design
•
•Objects, classes and reusableObjects, classes and reusable
•
•The Unified Modeling Language (UML) The Unified Modeling Language (UML) is an industry standard for modeling is an industry standard for modeling objectobject–oriented systemsoriented systems
4
Object
Object–Oriented Analysis and Oriented Analysis and Design (Continued)Design (Continued)
•
•ReusabilityReusability
•
•Recycling of program parts should reduce Recycling of program parts should reduce the costs of development in computerthe costs of development in computer–based systemsbased systems
•
•Maintaining systemsMaintaining systems
•
•Making a change in one object has a Making a change in one object has a minimal impact on other objectsminimal impact on other objects
5
Major Topics
Major Topics
•
•ObjectObject–oriented conceptsoriented concepts
•
•CRC Cards and object thinkCRC Cards and object think
•
•Unified Modeling LanguageUnified Modeling Language
•
•Use case and other UML diagramsUse case and other UML diagrams
•
•PackagesPackages
•
•Using UMLUsing UML
6
Object
Object–Oriented ConceptsOriented Concepts
•
•ObjectsObjects
•
•ClassesClasses
•
•InheritanceInheritance
7
Objects
Objects
•
•Persons, places, or things that are Persons, places, or things that are relevant to the system being analyzedrelevant to the system being analyzed
•
•May be customers, items, orders and so May be customers, items, orders and so onon
•
•May be GUI displays or text areas on a May be GUI displays or text areas on a displaydisplay
8
Classes
Classes
•
•Defines the set of shared attributes and Defines the set of shared attributes and behaviors found in each object in the classbehaviors found in each object in the class
•
•Should have a name that differentiates it Should have a name that differentiates it from all other classesfrom all other classes
•
•Instantiate is when an object is created from Instantiate is when an object is created from a classa class
•
•An attributes describes some property that is An attributes describes some property that is possessed by all objects of the classpossessed by all objects of the class
•
•A method is an action that can be requested A method is an action that can be requested from any object of the classfrom any object of the class
9
An example of a UML class. A class is depicted as a
An example of a UML class. A class is depicted as a rectangle consisting of the class name, attributes, and rectangle consisting of the class name, attributes, and methodsmethods
10
Inheritance
Inheritance
•
•When a derived class inherits all the When a derived class inherits all the attributes and behaviors of the base attributes and behaviors of the base classclass
•
•Reduces programming labor by using Reduces programming labor by using common objects easilycommon objects easily
•
•A feature only found in objectA feature only found in object–oriented oriented systemssystems
11
Figure 18.2
Figure 18.2A class diagram showing inheritance. Car A class diagram showing inheritance. Car and truck are specific examples of vehicles and inherit and truck are specific examples of vehicles and inherit the characteristics of the more general class vehiclethe characteristics of the more general class vehicle
18-12
CRC Cards and Object Think
CRC Cards and Object Think
•
•CRCCRC
•
•Class Class
•
•ResponsibilitiesResponsibilities
•
•Collaborators Collaborators
•
•CRC cards are used to represent the CRC cards are used to represent the responsibilities of classes and the responsibilities of classes and the interaction between the classesinteraction between the classes
13
Figure 18.3
Figure 18.3Four CRC cards for course offerings show how analysts Four CRC cards for course offerings show how analysts fill in the details for classes, responsibilities, and collaborators, as fill in the details for classes, responsibilities, and collaborators, as well as for object think statements and property nameswell as for object think statements and property names
14
Interacting during a CRC Session
Interacting during a CRC Session
•
•Identify all the classes you canIdentify all the classes you can
•
•Creating scenarios Creating scenarios
•
•Identify and refine responsibilitiesIdentify and refine responsibilities
15
The Unified Modeling Language
The Unified Modeling Language (UML) Concepts and Diagrams(UML) Concepts and Diagrams
•
•ThingsThings
•
•RelationshipsRelationships
•
•DiagramsDiagrams
16
Things
Things
•
•Structural things are Structural things are
•
•Classes, interfaces, use cases, and other elements that Classes, interfaces, use cases, and other elements that provide a way to create models provide a way to create models
•
•They allow the user to describe relationshipsThey allow the user to describe relationships
•
•Behavioral things Behavioral things
•
•Describe how things workDescribe how things work
•
•Interactions and state machinesInteractions and state machines
•
•Group thingsGroup things
•
•Used to define boundariesUsed to define boundaries
•
•Annotational thingsAnnotational things
•
•Can add notes to the diagramsCan add notes to the diagrams
17
Relationships
Relationships
•
•Structural relationships Structural relationships
•
•Tie things together in structural diagramsTie things together in structural diagrams
•
•Behavioral relationshipBehavioral relationship
•
•Used in behavioral diagramsUsed in behavioral diagrams
18
Structural Relationships
Structural Relationships
•
•DependenciesDependencies
•
•AggregationsAggregations
•
•AssociationsAssociations
•
•GeneralizationsGeneralizations
19
Behavioral Relationships
Behavioral Relationships
•
•CommunicatesCommunicates
•
•IncludesIncludes
•
•ExtendsExtends
•
•GeneralizesGeneralizes
20
Diagrams
Diagrams
•
•Structural diagramsStructural diagrams
•
•Used to describe the relation between Used to describe the relation between classesclasses
•
•Behavior diagramsBehavior diagrams
•
•Used to describe the interaction between Used to describe the interaction between people (actors) and a use case (how the people (actors) and a use case (how the actors use the system)actors use the system)
21
Structural Diagrams
Structural Diagrams
•
•Class diagramsClass diagrams
•
•Object diagramsObject diagrams
•
•Component diagramsComponent diagrams
•
•Deployment diagramsDeployment diagrams
22
Behavioral Diagrams
Behavioral Diagrams
•
•Use case diagramsUse case diagrams
•
•Sequence diagramsSequence diagrams
•
•Collaboration diagramsCollaboration diagrams
•
•Statechart diagramsStatechart diagrams
•
•Activity diagramsActivity diagrams
23
An overall view of UML and its components: Things,
An overall view of UML and its components: Things, Relationships, and DiagramsRelationships, and Diagrams
24
Commonly Used UML Diagrams
Commonly Used UML Diagrams
•
•Use case diagramUse case diagram
•
•Describing how the system is usedDescribing how the system is used
•
•The starting point for UML modelingThe starting point for UML modeling
•
•Use case scenarioUse case scenario
•
•A verbal articulation of exceptions to the main A verbal articulation of exceptions to the main behavior described by the primary use casebehavior described by the primary use case
•
•Activity diagramActivity diagram
•
•Illustrates the overall flow of activitiesIllustrates the overall flow of activities
25
Commonly Used UML Diagrams
Commonly Used UML Diagrams (Continued)(Continued)
•
•Sequence diagramsSequence diagrams
•
•Show the sequence of activities and class Show the sequence of activities and class relationshipsrelationships
•
•Class diagramsClass diagrams
•
•Show classes and relationshipsShow classes and relationships
•
•Statechart diagramsStatechart diagrams
•
•Show the state transitionsShow the state transitions
26
An overview of UML diagrams showing how each
An overview of UML diagrams showing how each diagram leads to the development of other UML diagram leads to the development of other UML diagramsdiagrams
27
Use Case Modeling
Use Case Modeling
•
•Describes what the system does, without Describes what the system does, without describing how the system does itdescribing how the system does it
•
•Based on the interactions and relationships of Based on the interactions and relationships of individual use casesindividual use cases
•
•Use case describesUse case describes
•
•ActorActor
•
•EventEvent
•
•Use caseUse case
28
A use case example of student
A use case example of student enrollmentenrollment
29
A use case scenario is divided into three sections:
A use case scenario is divided into three sections: identification and initiation, steps performed, and identification and initiation, steps performed, and conditions, assumptions, and questionsconditions, assumptions, and questions
30
Activity Diagrams
Activity Diagrams
•
•Show the sequence of activities in a process, Show the sequence of activities in a process, including sequential and parallel activities, including sequential and parallel activities, and decisions that are madeand decisions that are made
•
•Symbols Symbols
•
•Rectangle with rounded endsRectangle with rounded ends
•
•ArrowArrow
•
•DiamondDiamond
•
•Long, flat rectangleLong, flat rectangle
•
•FilledFilled–in circlein circle
•
•Black circle surrounded by a white circleBlack circle surrounded by a white circle
•
•SwimlanesSwimlanes
31
Specialized symbols are used to draw an
Specialized symbols are used to draw an activity diagramactivity diagram
32
Creating Activity Diagrams
Creating Activity Diagrams
•
•Created by asking what happens first, what Created by asking what happens first, what happens second, and so onhappens second, and so on
•
•Must determine what activities are done in Must determine what activities are done in sequence or in parallelsequence or in parallel
•
•The sequence of activities can be determined The sequence of activities can be determined from physical data flow diagramsfrom physical data flow diagrams
•
•Can be created by examining all the scenarios Can be created by examining all the scenarios for a use casefor a use case
33
Swimlanes
Swimlanes
•
•Useful to show how the data must be Useful to show how the data must be transmitted or convertedtransmitted or converted
•
•Help to divide up the tasks in a teamHelp to divide up the tasks in a team
•
•Makes the activity diagram one that Makes the activity diagram one that people want to use to communicate people want to use to communicate with otherswith others
34
This activity diagram shows three swimlanes: Client Web
This activity diagram shows three swimlanes: Client Web Page, Web Server, and MainframePage, Web Server, and Mainframe
35
Sequence Diagrams
Sequence Diagrams
•
•Illustrate a succession of interactions Illustrate a succession of interactions between classes or object instances between classes or object instances over timeover time
•
•Often used to show the processing Often used to show the processing described in use case scenariosdescribed in use case scenarios
•
•Used to show the overall pattern of the Used to show the overall pattern of the activities or interactions in a use caseactivities or interactions in a use case
36
Specialized symbols used to draw a
Specialized symbols used to draw a Sequence DiagramSequence Diagram
37
A sequence diagram for student admission. Sequence
A sequence diagram for student admission. Sequence diagrams emphasize the time ordering of messagesdiagrams emphasize the time ordering of messages
38
Communication Diagrams
Communication Diagrams
•
•Describes the interactions of two or more Describes the interactions of two or more things in the system that perform a behavior things in the system that perform a behavior that is more than any one of the things can that is more than any one of the things can do alonedo alone
•
•Shows the same information as a sequence Shows the same information as a sequence diagram, but may be more difficult to readdiagram, but may be more difficult to read
•
•Emphasizes the organization of objectsEmphasizes the organization of objects
•
•Made up of objects, communication links, and Made up of objects, communication links, and the messages that can be passed along those the messages that can be passed along those linkslinks
39
A Communication Diagram for student admission. Communication diagrams
A Communication Diagram for student admission. Communication diagrams show the same information that is depicted in a sequence diagram but show the same information that is depicted in a sequence diagram but emphasize the organization of objects rather than the time orderingemphasize the organization of objects rather than the time ordering
40
Class Diagrams
Class Diagrams
•
•Show the static features of the system Show the static features of the system and do not represent any particular and do not represent any particular processingprocessing
•
•Shows the nature of the relationships Shows the nature of the relationships between classesbetween classes
•
•Shows data storage requirements as Shows data storage requirements as well as processing requirementswell as processing requirements
41
Class Diagrams (Continued)
Class Diagrams (Continued)
•
•ClassesClasses
•
•AttributesAttributes
•
•PrivatePrivate
•
•PublicPublic
•
•ProtectedProtected
•
•MethodsMethods
•
•StandardStandard
•
•CustomCustom
42
A class diagram for course offerings. The filled
A class diagram for course offerings. The filled–in in diamonds show aggregation and the empty diamond diamonds show aggregation and the empty diamond shows a wholeshows a whole–part relationshippart relationship
43
Method Overloading
Method Overloading
•
•Including the same method (or Including the same method (or operation) several times in a classoperation) several times in a class
•
•The same method may be defined more The same method may be defined more than once in a given class, as long as than once in a given class, as long as the parameters sent as part of the the parameters sent as part of the message are differentmessage are different
44
Types of Classes
Types of Classes
•
•Entity classesEntity classes
•
•Interface classesInterface classes
•
•Abstract classesAbstract classes
•
•Control classesControl classes
45
Entity Classes
Entity Classes
•
•Represent realRepresent real–world itemsworld items
•
•The entities represented on an entityThe entities represented on an entity–relationship diagramrelationship diagram
46
Interface or Boundary Classes
Interface or Boundary Classes
•
•Provide a means for users to work with Provide a means for users to work with the systemthe system
•
•Human interfaces may be a display, Human interfaces may be a display, window, Web form, dialogue box, window, Web form, dialogue box, touchtouch–tone telephone, or other way for tone telephone, or other way for users to interact with the systemusers to interact with the system
•
•System interfaces involve sending data System interfaces involve sending data to or receiving data from otherto or receiving data from other
47
Abstract Classes
Abstract Classes
•
•Linked to concrete classes in a Linked to concrete classes in a generalization/specialization relationshipgeneralization/specialization relationship
•
•Cannot be directly instantiatedCannot be directly instantiated
48
Control Classes
Control Classes
•
•Used to control the flow of activitiesUsed to control the flow of activities
•
•Many small control classes can be used Many small control classes can be used to achieve classes that are reusableto achieve classes that are reusable
49
Defining Messages and Methods
Defining Messages and Methods
•
•Each message may be defined using a Each message may be defined using a notation similar to that described for notation similar to that described for the data dictionarythe data dictionary
•
•The methods may have logic defined The methods may have logic defined using structured English, a decision using structured English, a decision table, or a decision treetable, or a decision tree
50
A Sequence Diagram for using two Web pages: one for
A Sequence Diagram for using two Web pages: one for student information, one for course informationstudent information, one for course information
51
Relationships
Relationships
•
•The connections between classesThe connections between classes
•
•AssociationsAssociations
•
•Whole/part Whole/part
52
An example of an associative class in which a particular
An example of an associative class in which a particular section defines the relationship between a student and a section defines the relationship between a student and a coursecourse
53
Associations
Associations
•
•The simplest type of relationshipThe simplest type of relationship
•
•Association classes are those that are Association classes are those that are used to break up a manyused to break up a many–toto–many many association between classesassociation between classes
•
•An object in a class may have a An object in a class may have a relationship to other objects in the relationship to other objects in the same class, called a reflexive same class, called a reflexive associationassociation
54
Whole/Part Relationships
Whole/Part Relationships
•
•When one class represents the whole When one class represents the whole object, and other classes represent object, and other classes represent partsparts
•
•CategoriesCategories
•
•AggregationAggregation
•
•CollectionCollection
•
•CompositionComposition
55
Aggregation
Aggregation
•
•A “has a” relationshipA “has a” relationship
•
•Provides a means of showing that the Provides a means of showing that the whole object is composed of the sum of whole object is composed of the sum of its partsits parts
56
Collection
Collection
•
•Consists of a whole and its membersConsists of a whole and its members
•
•Members may change, but the whole Members may change, but the whole retains its identityretains its identity
•
•A weak associationA weak association
57
Composition
Composition
•
•The whole has a responsibility for the The whole has a responsibility for the parts, and is a stronger relationshipparts, and is a stronger relationship
•
•If the whole is deleted, all parts are If the whole is deleted, all parts are deleteddeleted
58
An example of whole
An example of whole–part and part and aggregation relationshipsaggregation relationships
59
Generalization/Specialization
Generalization/Specialization DiagramsDiagrams
•
•GeneralizationGeneralization
•
•InheritanceInheritance
•
•PolymorphismPolymorphism
•
•Abstract classesAbstract classes
•
•MessagesMessages
60
Generalization
Generalization
•
•Describes a relationship between a general kind of Describes a relationship between a general kind of thing and a more specific kind of thingthing and a more specific kind of thing
•
•Described as an “is a” relationshipDescribed as an “is a” relationship
•
•Used for modeling class inheritance and specializationUsed for modeling class inheritance and specialization
•
•General class is a parent, base, or superclassGeneral class is a parent, base, or superclass
•
•Specialized class is a child, derived, or subclassSpecialized class is a child, derived, or subclass
61
Inheritance
Inheritance
•
•Helps to foster reuseHelps to foster reuse
•
•Helps to maintain existing program Helps to maintain existing program codecode
62
Polymorphism
Polymorphism
•
•The capability of an objectThe capability of an object–oriented program oriented program to have several versions of the same method to have several versions of the same method with the same name within a with the same name within a superclass/subclass relationshipsuperclass/subclass relationship
•
•The subclass method overrides the superclass The subclass method overrides the superclass methodmethod
•
•When attributes or methods are defined more When attributes or methods are defined more than once, the most specific one is usedthan once, the most specific one is used
63
Abstract Classes
Abstract Classes
•
•Abstract classes are general classesAbstract classes are general classes
•
•No direct objects or class instances, and No direct objects or class instances, and is only used in conjunction with is only used in conjunction with specialized classesspecialized classes
•
•Usually have attributes and may have a Usually have attributes and may have a few methodsfew methods
64
A gen/spec diagram is a refined form
A gen/spec diagram is a refined form of a class diagramof a class diagram
65
Finding Classes
Finding Classes
•
•During interviewing or JAD sessionsDuring interviewing or JAD sessions
•
•During facilitated team sessionsDuring facilitated team sessions
•
•During brainstorming sessionsDuring brainstorming sessions
•
•Analyzing documents and memosAnalyzing documents and memos
•
•Examining use cases, looking for nounsExamining use cases, looking for nouns
66
Determining Class Methods
Determining Class Methods
•
•Standard methodsStandard methods
•
•Examine a CRUD matrixExamine a CRUD matrix
67
Messages
Messages
•
•Used to send information by an object in one Used to send information by an object in one class to an object in another class class to an object in another class
•
•Acts as a command, telling the receiving class Acts as a command, telling the receiving class to do somethingto do something
•
•Consists of the name of the method in the Consists of the name of the method in the receiving class, as well as the attributes that receiving class, as well as the attributes that are passed with the method nameare passed with the method name
•
•May be thought of as an output or an inputMay be thought of as an output or an input
68
Statechart Diagrams
Statechart Diagrams
•
•Used to examine the different states that an object Used to examine the different states that an object may havemay have
•
•Created for a single classCreated for a single class
•
•Objects are created, go through changes, and are deleted or Objects are created, go through changes, and are deleted or removedremoved
•
•ObjectsObjects
•
•StatesStates
•
•EventsEvents
•
•Signals or asynchronous messagesSignals or asynchronous messages
•
•SynchronousSynchronous
•
•Temporal eventsTemporal events
69
Statechart Diagrams
Statechart Diagrams (Continued)(Continued)
•
•Created whenCreated when
•
•A class has a complex life cycleA class has a complex life cycle
•
•An instance of a class may update its An instance of a class may update its attributes in a number of ways through the attributes in a number of ways through the life cyclelife cycle
•
•A class has an operational life cycleA class has an operational life cycle
•
•Two classes depend on each otherTwo classes depend on each other
•
•The object’s current behavior depends on The object’s current behavior depends on what happened previouslywhat happened previously
70
A Statechart diagram showing how a student progresses
A Statechart diagram showing how a student progresses from a potential student to a graduated studentfrom a potential student to a graduated student
71
Packages
Packages
•
•Containers for other UML thingsContainers for other UML things
•
•Show system partitioningShow system partitioning
•
•Can be component packagesCan be component packages
•
•Can be physical subsystemsCan be physical subsystems
•
•Use a folder symbolUse a folder symbol
•
•May have relationshipsMay have relationships
72
Use cases can be grouped into
Use cases can be grouped into packagespackages
73
Putting UML to Work
Putting UML to Work
The steps used in UML are:
The steps used in UML are:
•
•Define the use case modelDefine the use case model
•
•Continue UML diagramming to model the system Continue UML diagramming to model the system during the systems analysis phaseduring the systems analysis phase
•
•Develop the class diagramsDevelop the class diagrams
•
•Draw statechart diagramsDraw statechart diagrams
•
•Begin systems design by refining the UML Begin systems design by refining the UML diagramsdiagrams
•
•Document your system design in detailDocument your system design in detail
74
Summary
Summary
•
•ObjectObject–Oriented systemsOriented systems
•
•ObjectsObjects
•
•ClassesClasses
•
•InheritanceInheritance
•
•CRC cards CRC cards
•
•UML and use case modelingUML and use case modeling
•
•Components of UMLComponents of UML
•
•ThingsThings
•
•RelationshipsRelationships
•
•DiagramsDiagrams
75
Summary (Continued)
Summary (Continued)
•
•UML diagramsUML diagrams
•
•Use case diagramsUse case diagrams
•
•Activity diagramsActivity diagrams
•
•Sequence diagramsSequence diagrams
•
•Communication diagramsCommunication diagrams
•
•Class diagramsClass diagrams
•
•Statechart diagramsStatechart diagrams
•
[Button id=”1″]
[ad_2]
Source link
"96% of our customers have reported a 90% and above score. You might want to place an order with us."
