Successfully reported this slideshow.

Unified modeling language


Published on

This is a short ppt about UML. Particularly representation of classes and attributes using UML

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

Unified modeling language

  1. 1.  Model is a simplification of reality. A model provides the blueprint for a system we want to build. Very often, one model may not be sufficient for a given task, especially if the task is huge. Why we model? Continue
  2. 2. You want to build a doghouse for your dog…You take your tools, and start your work…
  3. 3. IIn the end, this is how it ends up…The dog is angry…But think he can live with it…Or else…
  4. 4. You can always start again…Or…
  5. 5. You can kick him out and get a new one…
  6. 6. You need to build a house for your family… andyou start your work…
  7. 7. Maybe something went wrong…
  8. 8. If it doesn’t work, you can kick…oooops, you can’t dothat!!! Should have planned something…
  9. 9.  Visualize a system as it is or as we want it to be. Permit us to specify the structure or behavior of a system. A template which guides us in constructing a system. Document the decisions we have made.
  10. 10.  UML means Unified Modeling Language. The Unified Modeling Language (UML) is a graphical language for visualizing, specifying, constructing, and documenting the artifacts of a software-intensive system. The UML offers a standard way to write a systems blueprints, including conceptual things such as business processes and system functions as well as concrete things such as programming language statements, database schemes, and reusable software components.
  11. 11. There are 3 basic building blocks in UML Things Relationships Diagrams
  12. 12.  Structural Things Class Interface Collaboration Use Case Active Class Component Node
  13. 13.  Behavioral Things Interaction State Machine Grouping Things (Packages) Annotational Things
  14. 14.  Dependency Association Generalization Realization
  15. 15.  Class diagram Object Diagram Use Case Diagram Sequence Diagram Collaboration Diagram Statechart diagram Activity Diagram Component Diagram Deployment Diagram
  16. 16.  A class is a set of objects that share the same attributes, operations, relationships, and semantics. A class is represented by a rectangle in UML. It contains the class name as the header. It contains its data members and member functions as well, sometimes with the associated data types.
  17. 17. NAME Student class student { -rollno :int ATTRIBUTES int rollno; -name :string char name[20]; -marks :float float marks; + <<constructor>> public: Student(r:int,n:string,m:m OPERATIONS arks) student( int +print() r, char n[20],float --initialize each object m);RESPONSIBILITIES of student class void print(); --print the details }
  18. 18.  Frozen data members : They are data members which cannot be modified . Multipliers: It refers to the number of instances of a particular class or attribute.
  19. 19.  Dependencies: Relations “using” relations among classes Generalizations: Typical inheritance relations Associations: Structural relations among objects
  20. 20. class gradstud : public student{ char degree[20]; public: void getdeg(); void put();}
  21. 21. Student gradstud#rollno :int -degree: string#name :string#marks :float+ <<constructor>>Student(r:int,n:string,m:m + getdeg()arks) +put()+print()--initialize each objectof student class--print the details
  22. 22.  Scope Inheritance Type
  23. 23.  Scope simply refers to the number of copies of a data member for a class. If there is only one instance for the whole class, it is called classifier scope. If each instance has a separate copy, it is called instance scope.
  24. 24. Student + classno :stringInstance -rollno :intScope : -name :stringNote, not -marks :floatunderlined Classifier Scope : + <<constructor>> Note it is Student(r:int,n:string,m:m underlined arks) +print() --initialize each object of student class --print the details
  25. 25.  Abstract classes and functions are specified by making them italicized. Class with no children is labelled leaf. Class with no parents is labelled root. Typically, child functions override parent functions, and are called polymorphic. If it is not so, label it as a leaf function.
  26. 26. Shape#Origin:point=(0,0)+display()+getorigin() Rectangle-l:int-b:int-h:int+display()
  27. 27.  Member functions can be specified with their return types. + isFull() : int Arguments in the argument list can also be specified. in :input argument, cannot be changed out : output argument inout :input parameter, can be changed Functions can also have associated properties like isQuery, sequential, guarded and concurrent.
  28. 28. Class Name[visiblility] name [multiplicity][:type][=initial value][{property}][visibility]name [(parameter list)][:return type][{property}]