Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

SW SEC 1.pptx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Chargement dans…3
×

Consultez-les par la suite

1 sur 43 Publicité

Plus De Contenu Connexe

Similaire à SW SEC 1.pptx (20)

Plus récents (20)

Publicité

SW SEC 1.pptx

  1. 1. UML Eng. Abd-ElRahman Hanfi
  2. 2. Agenda • Recap • Behavior and Structure • Class Diagram • ERD Diagram • Activity Diagram UML 2
  3. 3. Let’s Recap UML what does it stand for ? Why we are studying UML? How we will apply UML?
  4. 4. Unified Modeling language Unified : To become united Modeling : Something used as an example to follow or to imitate Language : Principle method for human communication “SO it’s a standard way to communicate through models” UML standards identify 13 types of diagrams that are divided into two groups. 4
  5. 5. UML Groups Structural Structural UML diagrams, as the name would suggest, show how the system is structured, including the classes, objects, packages, components, etc. in the system and the relationships between those elements. Behavioral These UML diagrams visualize how the system behaves and interacts with itself and with users, other systems, and other entities. UML 5
  6. 6. Use case & sequence Use case diagram Sequence diagram UML 6
  7. 7. Today’s subject : • Class Diagram • Activity diagram • ERD diagram 7
  8. 8. Class diagram: 8 • What is class diagram ? • How to draw a class diagram ? • Example
  9. 9. Class diagram: 9 • Class diagram is a structural diagram that shows the main structure of our system • Used to display the classes of your system • It gives you a static picture of the pieces in the system and of the relationships between them
  10. 10. The components of A class diagram: 10
  11. 11. Cont.: Class A class represents an object or set of objects that share a common structure and behavior (think of it as a template) Attribute • piece of data containing values describing each instance of that class Methods • any behavioral features of a class Presentation Title 11
  12. 12. Attributes : 12 Class attribute (noun) :- A class attribute is a significant piece of data containing values that describe each instance of that class we can also call it variable or a property An attribute consists of two parts : 1- data type 2- visibility : - (+) public : meaning that the attribute is visible to all other classes - (-) private : the attribute is not visible to any other class - (#) protected : the class and any of its descendants have access to the attribute
  13. 13. Method : 13 Class method (verb):- Is any behavioral feature of a class and we can also call it function or operation An method consists of three parts : 1- operation name 2- operation parameters (input) 3- operation return type (output) And it also has a visibility
  14. 14. Example : 14
  15. 15. Relationships : 15 Class relationships: 1-It shows how classes communicate with each others 2-It allows one class to know about the attributes, operations, and relationships of another class Relationship types : 1- association (has A) 2- inheritance (is A) 3-aggregation (a whole -> parts) 4- composition (Whole kills parts) 5- reflexive relationships
  16. 16. Multiplicity : 16 Multiplicity :an indication of how many objects may participate in the given relationship or the allowable number of instances of the element.
  17. 17. EXAMPLE : 17
  18. 18. EXAMPLE : 18
  19. 19. EXAMPLE : 19
  20. 20. EXAMPLE : 20
  21. 21. Activity diagram : 21 • What is activity diagram ? • How to draw activity diagram • example
  22. 22. Activity diagram : 22 • Activity diagram is a flowchart to represent the flow of control among the activities in the system • Activity diagrams describe the workflow behavior of a system • Activity diagram illustrates the dynamic nature of a system by modeling the flow of control from activity to activity
  23. 23. Components of an AD: 23 • Diagrams are read from top to bottom and have branches and forks to describe conditions and parallel activities. • A fork is used when multiple activities are occurring at the same time. • A branch describes what activities will take place based on a set of conditions. • All branches at some point are followed by a merge to indicate the end of the conditional behavior started by that branch. • After the merge all of the parallel activities must be combined by a join before transitioning into the final activity state.
  24. 24. 24 Activity Diagram: Fork Branch Start State Merge Join Activity End State
  25. 25. 25 Example : Fork Branch Start State Merge Join Activity End State
  26. 26. ERD : 26 • What is ER diagram ? • How to draw ER diagram • example
  27. 27. ERD : 27 • a data modeling technique that graphically illustrates an information system’s entities and the relationships between those entities. • An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how “entities” such as people, objects or concepts relate to each other within a system • Also known as ERDs or ER Models, they use a defined set of symbols such as rectangles, diamonds, ovals and connecting lines to show entities, relationships and their attributes. They mirror grammatical structure, with entities as nouns and relationships as verbs
  28. 28. Components of ERD : 28 • • ER Diagrams are composed of entities, relationships and attributes. They also depict cardinality, which defines relationships in terms of numbers. • An ERD entity is a definable thing or concept within a system, such as a person/role (e.g. Student), object (e.g. Invoice), concept (e.g. Profile) or event (e.g. Transaction) (note: In ERD, the term "entity" is often used instead of "table", but they are the same). • Entity Attributes Also known as a column, an attribute is a property or characteristic of the entity that holds it. • Relationship A relationship between two entities signifies that the two entities are associated with each other somehow. For example, a student might enroll in a course. The entity Student is therefore related to Course, and a relationship is presented as a connector connecting between them.
  29. 29. Database design : 29 • ER diagrams are used to model and design relational databases, in terms of logic and business rules (in a logical data model) and in terms of the specific technology to be implemented (in a physical data model.) • In software engineering, an ER diagram is often an initial step in determining requirements for an information systems project. It’s also later used to model a particular database or databases.
  30. 30. Cardinality : 30 • Defines the numerical attributes of the relationship between two entities or entity sets. • The three main cardinal relationships are one-to-one, one-to-many, and many-many. • A one-to-one example would be one student associated with one mailing address. • A one-to many example (or many-to-one, depending on the relationship direction): One student registers for multiple courses, but all those courses have a single line back to that one student. • Many-to-many example: Students as a group are associated with multiple faculty members, and faculty members in turn are associated with multiple students.
  31. 31. PK : 31 Primary Key Also known as PK, a primary key is a special kind of entity attribute that uniquely defines a record in a database table. In other words, there must not be two (or more) records that share the same value for the primary key attribute. The ERD example below shows an entity 'Product' with a primary key attribute 'ID', and a preview of table records in the database. The third record is invalid because the value of ID 'PDT-0002' is already used by another record.
  32. 32. FK : 32 Foreign Key Also known as FK, a foreign key is a reference to a primary key in a table. It is used to identify the relationships between entities. Note that foreign keys need not be unique. Multiple records can share the same values. The ER Diagram example below shows an entity with some columns, among which a foreign key is used in referencing another entity.
  33. 33. CPK : 33 A Composite Primary Key is created by combining two or more columns in a table that can be used to uniquely identify each row in the table when the columns are combined.
  34. 34. FK : 34
  35. 35. bridge table : 35 Physical data modelling techniques transform a many-to-many many-relationships into one-to many- relationships by adding additional tables. Because many – many relationship may cause lack of performance ?
  36. 36. FK : 36
  37. 37. FK : 37
  38. 38. ERD : 38
  39. 39. 39 Example :
  40. 40. Content Subtitle • Add text, images, art, and videos. • Add transitions, animations, and motion. • Save to OneDrive, to get to your presentations from your computer, tablet, or phone. Subtitle • Add text, images, art, and videos. • Add transitions, animations, and motion. • Save to OneDrive, to get to your presentations from your computer, tablet, or phone. Presentation Title 40
  41. 41. Content Subtitle • Add text, images, art, and videos. • Add transitions, animations, and motion. • Save to OneDrive, to get to your presentations from your computer, tablet, or phone. Subtitle • Add text, images, art, and videos. • Add transitions, animations, and motion. • Save to OneDrive, to get to your presentations from your computer, tablet, or phone. Presentation Title 41
  42. 42. Summary UML diagrams can be used as a way to visualize a project before it takes place or as documentation for a project afterward. But the overall goal of UML diagrams is to allow teams to visualize how a project is or will be working, and they can be used in any field, not just software engineering. “Don’t forget to practice” 42
  43. 43. THANK YOU 43

Notes de l'éditeur

  • UML stands for unified modeling language

×