ΚΛΑΣΕΙΣ,...
date post
04-Jan-2016Category
Documents
view
34download
8
Embed Size (px)
description
Transcript of ΚΛΑΣΕΙΣ,...
, 1. 2. 3. 4. 5. 6.
1.
, , .
(.. ) (.. : , , .) (.. )
:
-> , : , : , , . : , ,
()0..*1..*(or)10..*0..*1..*
( ) ( )
()Bob : Bobs PC:Name =Bob.jage = 32Name =Dell 466 memory=64
2. UML (attributes) K ()
(1/4); :
(2/4);
,
(3/4); : , , , , .
: , , ,
(4/4); :sensor, display, I/O card, engine, button, control class
system software: file, executable program, device, icon, window, scrollbar
, ; ; , ; ; ;
UMLNameAttributesOperations
. NameAttributeOperation
fros car: YIX 5831Renault Clio140 km
(attributes) H : : = {property string}.. +: = {, } ( , ): , , boolean, ... : , (- + #). : . . . .( UML )
, () + : + : =+ : - :=
(private), . (public) . # (protected).
(class attribute)+ : + : H = .+ : - : = - : . ( 0).
property string( )
M () . ( ) : ( ): {property string} . : N /
+ . : - : _+ : + : + ( : , : )+ _ ( ) : _ , . _ , _.
: : : ()():
Figuresize: Sizepos: Position+ draw ()+ resize(percentX :Integer =25; percentY :Integer=25)+ returnPos() : Position
Callfigure.resize(10,10) percentX=10, percentY=10
figure.resize(37)percentX=37, percentY =25figure.resize ( ) percentX=25, percentY = 25
3. 3.0 3.1 (Association)3.2 (Generalization)3.3 (Dependency)3.4 / (Refinement)
3.0 (association) : . (generalization) : . . (dependency) : . ./ (refinement) : , .
3.1 (ssocations) EI (Normal Association) (Recursive Association) (Qualified Association) (OR-Assocation) (Ordered Association)T - (ernary or N-ary Association)K (Association Class) ( )K (Normal Aggregation) (Shared or Weak Aggregation) (Composition Aggregation)
(Normal association)1..* 0..*
( ) . ( ) .
() () () (multiplicity) , ()
(Multiplicity) * ..
default 1. : 1 0: * (0..*)0 1: 0..1 (.. 3): 3 (.. 3 ): 3..* (.. 3 6): 3..6 (.. 3,6,7,8,9): 3,6..9
10..*1..*0..*11..*10..1 ()
()0..*1..*Name : stringage : IntegerName : Stringmemory: IntegerBob : Bobs PC:Name =Bob.jage = 32Name =Dell 466 memory=64
(recursive association) . , **
ABCB*11*** :N. , M: 1: : 1:
** .
, .
. .
. . , .
(Qualified Association)
CanvasFigureFigure.id* 1 1: : 1:1
(OR-Association)0..*1..*{or}10..*0..*1..* :
(rdered Association)
0..*1..*{ } . { } , .
default .
(1/3)(Association class)*4 , . ,
(2/3)(Association class) M:N
1:1 1:NUserAppointment1..**ParticipationisRelocatableCompanynameaddressPersonnamesocSec#addressloanposition1*Employmentloanposition
(3/3)(Association class)PersonProjectEmploymentqualificationProfilehoursdailyRate** employment project.
T (Ternary association) 1..*0..10..*10..* (-) ( ) . , .
(GGREGATION) :
: C part-of B B part-of C part-of
-: part-of part-of B
*H , - (part of)
. , . .
() (). , . (NORMAL AGGREGATION)
(SHARED AGGREGATION) **M , 1.
.
, .
. .
Y , reference .
(Composition Aggregation) , (wholeside) 0..1 , (partside)
(Composition Aggregation)1 *** . , . .
(Composition Aggregation)2 *** , . .
Laurel andHardy MovieActorStan laurelOliver HardyLaurel and Hardie MovieOliver Hardy 1Stan Laure 1 ActorLaurel and Hardy MovieOliver Hardy:ActorStan Laurel:Actor (Composition Aggregation)3 : Laurel and Hardie, Oliver Hardy and Stan Laurel
(Composition Aggregation)4
*** .
0..10..10..1okcancelinformation ok [0..1] : Buttoncancel [0..1] : Buttoninformation[0..1] :Icon OK , cancel . . . (Composition Aggregation)
3. 3.0 3.1 (Association)3.2 - (Generalization-Specialization)3.3 (Dependency)3.4 / (Refinement)
3.2 - (GENERALIZATION-SPECIALIZATION)
To , , use cases . .
() .
() () (-). ( ) , ( )
, ( )
(Constrained generalization) verlapping: Disjoint: (default) Complete: Incomplete: (default)
: { 1, 2, ... } { 1,2..}
(Overlapping and disjoint){ overlapping} ( ), (disjoint) default.
(Complete or incomplete generalization){} , .
To default
3. 3.0 3.1 (Association)3.2 (Generalization)3.3 (Dependency)3.4 / (Refinement)
3.3 (Dependency relationship) use cases, etc.( UML)
M , . ,
: . .
, .
3.4 REFINEMENT RELATIONSHIP( ) refinement
,
.
1. 2. 3. 4. 5.
M . , , . abstract , 4.
abstract , abstract . , abstract , , abstract
{abstract}Drive(){abstract}
ADrive()Drive()Drive() Drive ()
{abstract}Drive(){abstract}Drive( )Drive( ) . , . abstract .
Figure{abstract}#position:PosDraw(){abstract}GroupDraw()PolygonDraw( )Figures *
#position:PosDraw(){abstract}CarDrive()BoatDrive( )Vehicle{abstract}Drive( ) {abstract}PropulsionPropulsion
5. 5.1 (Constraints and Derivation Rules)5.2 (Interface)5.3 (Packages)5.4 (emplates)
5.1 (Constraints and derivation rules)O . , , (verlapping, disjoint ...) . , .. ( ). : , , , (generalization) (derivations). (overlapping, disjoint, complete, incomplete)
{ }
{}1 11* 1
+ amount : Real+ date :Date = Current date+ customer : String- number of invoices : Integer+status :Status = Unpaid {unpaid,paid}Invoice
/{ = - }
5.2 (Interface) interface /, . , (, , component) interface OLE/COM Java interfaces, interface ( components )
StorableRunnableInterfaceRunnable{abstract}
Run(){abstract}InterfaceStorable{abstractLoad() {abstract}save(){abstract} interfaces interface abstract . H interface Runnable Storage. H interface Runnable. H interface Runnable Storage Runnable . interfaces interfaceRunnable
5.3 AKETA (Packages) T . . , (refinement) (aggregation). A , (composition aggregation) , ( ) (shared aggregation)
. - . , . .
ZWBW::ZATo ( W) (is imported) A .
interface interface IH S Class PXBDAClass SI
(Visibility) :K . : . : , . : , .
5.4 (Template)
template , template.
O template , boolean
Array ArrayColorrrayT,n : integerbind TEMPLATESTo rray T () n (). .
template . refinement ( template) template.
6. T ; , ; ; ; ;
, . UML ( ) ( , , ) ( use case ) ( component deployment ) UML ,
.