Upload
hyman
View
34
Download
0
Embed Size (px)
DESCRIPTION
Enterprise & Application Frameworks. Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José State University One Washington Square San José, CA 95192-0180 URL: http://www.cmpe.sjsu.edu/~fayad. Class Diagrams-Part II. Acknowledgements. - PowerPoint PPT Presentation
Citation preview
SJSU – CmpE Fall 2002
Enterprise & Application Frameworks
Dr. M.E. Fayad, ProfessorComputer Engineering Department – RM#
College of Engineering
San José State University
One Washington Square
San José, CA 95192-0180
URL: http://www.cmpe.sjsu.edu/~fayad
Fall 2002 SJSU – CmpE M.E. Fayad L7-S2 Modeling
Class Diagrams-Part II
Fall 2002 SJSU – CmpE M.E. Fayad L7-S3 Modeling
Acknowledgements “Developing Software With UML:
Object Oriented Analysis and Design in Practice”
By: Bernd Oestereich
Using UML: Software Engineering with Objects and Components
By: Rob Pooley and Perdita Stevens
“Rational Rose UML Tutorial and Demo”
Rational Software Corporation
Fall 2002 SJSU – CmpE M.E. Fayad L7-S4 Modeling
Generalization, Specialization Related terms: inheritance Definition:
– Inheritance is a programming language concept; an implementation mechanism for the relationship between superclasses and subclasses by means of which attributes and operations of a superclass also become accessible to its subclasses.
Fall 2002 SJSU – CmpE M.E. Fayad L7-S5 Modeling
Generalization, Specialization Notation:
– The inheritance relation is represented by means of a large empty arrow pointing from the subclass to the superclass.
Superclass
Subclass
Subclass Subclass
Subclass
Fall 2002 SJSU – CmpE M.E. Fayad L7-S6 Modeling
Generalization, Specialization Example:
GeomFigure{abstract}x: Integery: Integer
visible: Booleandisplay() {abstract}
Remove() {abstract}moveTo(pX, pY)
Triangle
a {c-b<a<b+c}b {a-c<b<a+c}c {a-b<c<a+b}
setSides(pA,pB,pC)display()remove()
Rectangle
a {a>0}b {b>0}
setSides(pA, pB)display()remove()
Circle
radius {radius >0)
setRadius(pR)display()remove()
Fall 2002 SJSU – CmpE M.E. Fayad L7-S7 Modeling
Multiple Inheritance In multiple inheritance, a class can have
more than one superclass.
Animal
Fish
Aquatic
Trout
Mammal
Dolphin
Terrestrial
Pig
Habitat
Fall 2002 SJSU – CmpE M.E. Fayad L7-S8 Modeling
Multiple Inheritance Example: Vehicle
namemanufacuturer
WindpoweredVehicle
minWindForcemaxWindForce
Motor VehiclefuelType
power
Water Vehicledraught
displacement
surfaceOfSailsnumOfSails
SailingBoat
LocomotionMedium KindOfPower{Overlapping}
Fall 2002 SJSU – CmpE M.E. Fayad L7-S9 Modeling
Multiple Inheritance Overlapping Versus Disjoint
overlappingSailingboat
namemanufacturer
draughtdisplacement
surfaceOfSailsnumOfSails
disjointSailingBoat
waterVehicle:namewindpoweredVehicle.namewaterVehicle:manufacturer
windpoweredVehicle.manufacturerdraught
displacement surfaceOfSails
numOfSails
Fall 2002 SJSU – CmpE M.E. Fayad L7-S10 Modeling
Behavior Diagrams
Fall 2002 SJSU – CmpE M.E. Fayad L7-S11 Modeling
Activity Diagrams Related terms: object state, action state,
state diagram Description:
– An activity is a single step in a processing procedure.
Fall 2002 SJSU – CmpE M.E. Fayad L7-S12 Modeling
Activity Diagrams
Fall 2002 SJSU – CmpE M.E. Fayad L7-S13 Modeling
Sequence Diagrams Related terms: interaction diagram,
event trace diagram, scenario, message diagram.
Definition:– A sequence shows a series of messages
exchanged by a selected set of objects in a temporally limited situation, with an emphasis on the chronological course of events.
Fall 2002 SJSU – CmpE M.E. Fayad L7-S14 Modeling
Sequence Diagrams
: Registrarcourse form :
NewCourseFormSales 101 :
Course : Transaction
Manager : DBCourse
open
set info
submit for processingnewCourse ( )
course created
saveCourse ( ) saveCourse ( )
getInfo ( )
Fall 2002 SJSU – CmpE M.E. Fayad L7-S15 Modeling
Collaboration Diagrams Related terms: cooperation diagram,
interaction diagram, object diagram Definition:
– A collaboration diagram shows a set of interactions between selected objects in a specific, limited situation, focusing on the relations between the objects.
Fall 2002 SJSU – CmpE M.E. Fayad L7-S16 Modeling
Collaboration Diagrams
Fall 2002 SJSU – CmpE M.E. Fayad L7-S17 Modeling
Questions?
Fall 2002 SJSU – CmpE M.E. Fayad L7-S18 Modeling
Rational Rose Demonstration