1 / 14

Class Diagram Eng .Riham Mqat

Class Diagram Eng .Riham Mqat. Class diagram. 1. Class diagram is a way of showing system classes and the relations among them. 2. Static diagrams, pick only existence and relationships but not actions. Representing a class. Class name Attributes Operations(methods). Attributes.

ronny
Download Presentation

Class Diagram Eng .Riham Mqat

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Class DiagramEng .Riham Mqat

  2. Class diagram 1. Class diagram is a way of showing system classes and the relations among them. 2. Static diagrams, pick only existence and relationships but not actions.

  3. Representing a class • Class name • Attributes • Operations(methods)

  4. Attributes Syntax: attributeName : type Ex: firstName : String salary : Dollars

  5. Methods Syntax: methodName(parm) : return type Ex: setName(String) getSalary() : Dollars

  6. Representing a class

  7. Visibility • You can show the visibility of attributes and methods by these signs + : public - : private # : protected ~ : package

  8. Classes Relationships • Association • Aggregation • Composition • Generalization • Multiplicity

  9. Association • if there is a conceptual connection between two classes we say that these classes are associated.

  10. Multiplicity • An indication of numerical limit of a relation.

  11. Aggregation & Composition • Both describe the relation between a whole and its parts. • To test if you are dealing with aggregation or composition check : • If the part belong only to one whole then its • composition.

  12. Example:

  13. Aggregation & Composition • Aggregation • Composition • The diamond sign is always at the side of the whole.

  14. Generalization • A way of describing inheritance in Class Diagram.

More Related