+ All Categories
Home > Technology > Class and object_diagram

Class and object_diagram

Date post: 25-Jun-2015
Category:
Upload: sadhana28
View: 548 times
Download: 0 times
Share this document with a friend
Popular Tags:
22
CLASS AND OBJECT DIAGRAMS Submitted by : Sadhana Singh M.Tech(S.E.)
Transcript
Page 1: Class  and object_diagram

CLASS AND OBJECT DIAGRAMS

Submitted by: Sadhana Singh

M.Tech(S.E.)

Page 2: Class  and object_diagram

Contents

Introduction about Class DiagramCommon Uses of Class DiagramCommon Modeling Techniques for Class

DiagramIntroduction about Object DiagramCommon Uses of Object DiagramCommon Modeling Techniques for Object

DiagramDifference between class and object diagram

Page 3: Class  and object_diagram

Introduction about Class Diagram

Found in modeling object oriented system.Use to model static design view of a system.Main building block of Object Oriented

Modeling.Describes the type of objects in system. In the diagram these classes are represented with

boxes which contain three parts◦ The upper part holds the name of the class

◦ The middle part contains the attributes of the class

◦ The bottom part gives the methods or operations the class can take or undertake

Page 4: Class  and object_diagram

Example:

Page 5: Class  and object_diagram

Common Uses of Class Diagram

To model the vocabulary of system.

To model simple collaborations.

To model a logical database schema.

Page 6: Class  and object_diagram

Common Modeling Techniques for Class Diagram

Modeling simple collaborations.

Modeling a logical database schema.

Forward and Reverse Engineering.

Page 7: Class  and object_diagram

Modeling simple collaborations

Identify the mechanism we had like to model.

For each mechanism, identify the classes, interfaces, and other collaborations that participate in this collaboration.

Use scenarios to walk through these things.

To populate these elements with their contents.

Page 8: Class  and object_diagram
Page 9: Class  and object_diagram

Modeling a logical database schema

Identify those classes in our model whose state must transcend the lifetime of their application.

Create a class diagram that contains these classes and mark them as persistent.

Expand the structural details of these classes.Watch for common patterns that complicate

physical database design.Consider also the behavior of these classes by

expanding operations.Use tools to help we transform our logical design

into a physical design.

Page 10: Class  and object_diagram
Page 11: Class  and object_diagram

Forward and Reverse Engineering

Forward EngineeringIdentify the rules for mapping to our

implementation language or languages of choice.

Depending on the semantics of the languages we choose, we may have to constrain our use of certain UML features.

Use tagged values to specify our target language.

Use tools to forward engineer our models.

Page 12: Class  and object_diagram
Page 13: Class  and object_diagram

Forward engineering the class EventHandler yields the following code.

public abstract class EventHandler {

EventHandler successor;

private Integer currentEventID;

private String source;

EventHandler() {}

public void handleRequest() {}

}

Page 14: Class  and object_diagram

Reverse Engineering

Identify the rules for mapping from our implementation language or languages of choice.

Using a tool, point to the code we had like to reverse engineer.

Using our tool, create a class diagram by querying the model.

Page 15: Class  and object_diagram

Introduction about Object Diagram

Gives snapshots of the system.Shows a complete or partial view of structure of

a modeled system at specific time.Derived from class diagrams.Represent an instance of class diagrams.To model the static design view.

Page 16: Class  and object_diagram

Common Uses of Object Diagram

To model object structure.

Page 17: Class  and object_diagram

Common Modeling techniques for Object Diagram

Modeling object structures.

Forward and Reverse Engineering.

Page 18: Class  and object_diagram

Modeling object StructuresIdentify the mechanism we had like to model.For each mechanism, identify the classes,

interfaces, and other elements that participate in this collaboration; identify the relationships among these things, as well.

Consider one scenario that walks through this mechanism.

Expose the state and attribute values of each such object, as necessary, to understand the scenario.

Similarly, expose the links among these objects, representing instances of associations among them.

Page 19: Class  and object_diagram
Page 20: Class  and object_diagram

Forward and Reverse Engineering

Reverse EngineeringWe’ll set your context inside an operation or relative

to an instance of one particular class.Using a tool or simply walking through a scenario,

stop execution at a certain moment in time. Identify the set of interesting objects that collaborate

in that context and render them in an object diagram.As necessary to understand their semantics, expose

these object's states.As necessary to understand their semantics, identify

the links that exist among these objects.

Page 21: Class  and object_diagram

Difference between Class and Object Diagrams

A class diagram is a graph of Classifier elements connected by their various static relationships whereas an object diagram is a graph of instances, including objects and data values.

Class diagrams can contain objects, so a class diagram with objects and no classes is an object diagram.

Class diagrams are the blueprints of your system or subsystem whereas object diagram shows a snapshot of the detailed state of a system at a point in time.

Page 22: Class  and object_diagram

THANK YOU


Recommended