-->

UML Class Diagrams

Class Diagrams in UML, OOAD Class Diagrams-OOAD Lecture Notes pdf
Class Diagrams
A class diagram is a set of classes, interfaces, collaborations and their relationships 
Graphically, a class diagram is a collection of vertices and arcs
cse study zone,estudies4you,uml Class Diagrams,ooad Class Diagrams,Class Diagrams in uml,Class Diagrams in ooad,use of Class Diagrams in uml,role of Class Diagrams in uml,common modeling techniques of Class Diagrams,forward engineering in Class Diagrams,reverse engineering in Class Diagrams,define Class Diagram in uml,what is Class Diagram,
Contents 
Class diagram contains:
  • Classes 
  • Interfaces 
  • Collaborations 
  • Relationships 
-Dependency
-Generalization
-Association
  • It also contains packages or subsystems, used to group elements in a model into larger chunks
Uses
Class diagram model the static design view of a system, which is used: 
  • To model the vocabulary of a system 
  • To model simple collaborations 
  • To model a logical database schema
Common Modeling Techniques
Modeling Simple Collaborations 
cse study zone,estudies4you,uml Class Diagrams,ooad Class Diagrams,Class Diagrams in uml,Class Diagrams in ooad,use of Class Diagrams in uml,role of Class Diagrams in uml,common modeling techniques of Class Diagrams,forward engineering in Class Diagrams,reverse engineering in Class Diagrams,define Class Diagram in uml,what is Class Diagram,
  • To model collaboration, identify the mechanism to model 
  • A mechanism represents some function or behavior of the part of the system which is modeled. A mechanism results from the interaction of a society of classes, interfaces and other things 
  • For each mechanism, identify classes, interfaces and other collaborations that participate in this collaboration 
  • Identify relationships among these things as well 
  • Use scenarios to walk through these things
  • Along the way, parts of model that went missing and parts that were just plain semantically wrong can be discovered 
  • Be sure to populate these elements with their contents 
  • For classes, start with getting a good balance of responsibilities 
  • Then, over time, turn these into concrete attributes and operations
cse study zone,estudies4you,uml Class Diagrams,ooad Class Diagrams,Class Diagrams in uml,Class Diagrams in ooad,use of Class Diagrams in uml,role of Class Diagrams in uml,common modeling techniques of Class Diagrams,forward engineering in Class Diagrams,reverse engineering in Class Diagrams,define Class Diagram in uml,what is Class Diagram,

Modeling a Logical Database Schema 
To model a schema, 
  • Identify those classes in the model whose state must transcend the lifetime of their applications 
  • Create a class diagram that contains these classes. Custom set of stereotypes and tagged values to address database-specific details can be defined 
  • Expand the structural details of these classes 
  • In general, this means specifying the details of their attributes and focusing on the associations and their multiplicities that relate these classes 
  • Watch for common patterns that complicate physical database design such as cyclic associations and one-to-one associations 
  • Where necessary, create intermediate abstractions to simplify your logical structure 
  • Consider also the behavior of these classes by expanding operations that are important for data access and data integrity 
  • In general, to provide a better separation of concerns, business rules concerned with the manipulation of sets of these objects should be encapsulated in a layer above these persistent classes 
  • Where possible, use tools to help transform the logical design into a physical design
Forward and Reverse Engineering 
Forward Engineering 
  • To forward engineer a class diagram, Find out the rules for mapping to the implementation language. This can be done at the project level or organization level 
  • Based on semantics of the languages selected, use of certain UML features may have to be avoided. For example, many object-oriented languages do not support multiple inheritance, but it is possible to model it in UML. In this case, developers can be prevented from modeling multiple inheritance, even though it confines the model to certain languages 
  • Tagged values can be used to assist implementation choices in the target language 
  • This can be done at the level of individual classes. This can also be done at a higher level, for example, with collaborations or packages 
  • Tools can be used to generate code
cse study zone,estudies4you,uml Class Diagrams,ooad Class Diagrams,Class Diagrams in uml,Class Diagrams in ooad,use of Class Diagrams in uml,role of Class Diagrams in uml,common modeling techniques of Class Diagrams,forward engineering in Class Diagrams,reverse engineering in Class Diagrams,define Class Diagram in uml,what is Class Diagram,

Reverse Engineering 
To reverse engineer a class diagram, 
  • Find out the rules for mapping from the implementation language. This can be done at the project level or organization level 
  • Tools can be used to create a new model or modify an existing model, which was previously forward engineered 
  • One simple model may not possible from large piece of code 
  • The code that needs to be reverse engineered can be selected using the tool 
  • The most common diagram that is generated using reverse engineering is class diagram. This can be done starting from one or more classes and navigating to neighboring classes. The level of detail to depict can be selected based on the purpose of the model

Related Posts

Post a Comment

Subscribe Our Newsletter