Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Software Engineering

UML
Class Diagrams
Rules

B. Wakim
Creating an Entity Class Diagram

 Interviews
 Collect documents and data
 Analysing documents to extract attributes
 Establish Functional Dependency Graph.
 Deduce Entities Class Diagram
 Add cardinalities
 Check entities normal forms.
 Check relation decomposition.
Normal forms

 1st Normal form


 A B  a corresponds one value of B

 2d Normal form Ͻ 1st Normal form +


 A+C B and There is NO dependency between
A  B Or C  B

 3d Formal norms Ͻ 2d Normal form


 A B and There is no C , with A  C and C  B
Example of 1st
normal form
Example of 2d normal form
Example of 3d normal form
Decomposition

 If we have a ternary relation/association, we can


decompose if:
 There is a FD between two classes

 This FD concerns the same relation to decompose

 We can decompose by :
 Implementing the FD between the two classes

 Adding a relation between the head of FD and the

other class.
Example of decomposition
Example of decomposition
Example of
decomposition

Class + Teacher Course


Example of decomposition
Class  Teacher (Responsible-
Coordinator).
Example of analysing a document

• Deduce Fields
• Num_order
• Date_order
• Name_client
• Adr_client
• Desc_prod
• Price_prod
• Qty_prod
• Total_line
• Total_order
Graph of FD: Establishing FD
Graph of FD: Grouping attributes
Class diagram
Class diagram

You might also like