Presentation is loading. Please wait.

Presentation is loading. Please wait.

Visit for more Learning Resources

Similar presentations


Presentation on theme: "Visit for more Learning Resources"— Presentation transcript:

1 Visit for more Learning Resources

2 2. Class Modeling An object model captures the static structure of a system by showing the objects in the system ,and relationship between the objects, and the attributes and operations that characterize each class of objects.

3 Object modeling gives the static structure of objects, classes and their relationship to one another. Object model is useful for demonstration of a system to customers.

4 Objects The purpose of object modeling is to describe objects. Object promotes understanding of the real world and provide a practical basis for computer implementation. Objects are separate ,distinguishable entities. They are basic entities.

5 Object means a single thing or group of similar things.
Example: 1.A single apple : 1 object 2. Two to three apple : Group of object Another example a 1 person and a group of person

6 Classes A class is a group of objects with similar properties(attributes),behaviour(operation),common relationship to other objects . A class is a collection of objects of similar types. Once a class has been defined we can create any number of objects belonging to the same class. Example:- table, chair,desk are objects of class furniture.

7 Fig. Class & Objects Class object object (TYCOMPUTER) Sanjivani (TYCOMPUTER) Bhavana TYCOMPUTER Class is represented by rectangle box whereas objects are represented by rounded box.

8 Object Diagram Object diagram provides a graphical representation. It gives graphical representation of objects ,classes and their relationship to one another. There are two types of object diagrams. 1.Class diagrams 2.Instance diagrams

9 A class diagram is a rectangle for describing many possible instances (object) of data.
Class diagram describes object classes i.e. objects. An instance diagram describes object instances.

10 Attributes(data) An attribute is nothing but data values of an object.
Ex:- Name ,age and address are attributes of TYCOMPUTER objects. Each object has value for each object instance. Ex:- attribute AGE of TYCOMPUTER class has value “16”.

11 Fig. Attributes and values
Class with attributes Objects with values TYCOMPUTER Name:string Age:Integer (TYCOMPUTER) Sanjivani 18 (TYCOMPUTER) Bhavana 20

12 Class TYCOMPUTER has a attributes name and age
Class TYCOMPUTER has a attributes name and age. Name is string and age is an integer. One object in class TYCOMPUTER has the value Sanjivani for name and 18 for age.

13 Operations and Methods
An operation is nothing but function which is used by objects in a class. The same operation may be applied to many different classes. Such an operation is polymorphic. Ex:- The class NUMBER may have operation ADD.Different methods could be implemented to add integer numbers, add float numbers. All these methods perform the same task:addition of numbers.

14 Fig.Operations The class TYCOMPUTER has name & age as attributes and operations change class & change address. TYCOMPUTER Name Age Change class Change Address

15 Object modeling Notation for Class
A class is represented in a BOX which has 3 parts. 1st part: Class name 2nd part: Attributes 3rd part: Operations

16 Links And Associations
Links and associations are the ways of connections among objects and classes. A link is physical connection between objects. A link is an instance of an association. A link shows relationship between two or more objects.

17 Associations An association is a group of links with common structure.
All the links in an association connect object from the same classes. Associations are bi-directional. Associations are of many types like one-to-one,multiplicity,binary,ternary or higher order. The OMT notation for an association is a line between classes. Association names are written on that line in italic font.

18 Fig.One to One association & Links
Class Diagram Each Country class has capital city class. So Has_Capital is the name of the association Has Capital Country City Name Name Class Diagram

19 Fig.One to One association & Links
Instance Diagram(Object Diagram) Has_capital (City) Delhi (Country) India (Country) USA Has_capital (city) Washington

20 Association Relationships
If two classes in a model need to communicate with each other, there must be link between them. An association denotes that link. Student Instructor Software Design (UML)

21 Association Relationships (Cont’d)
We can indicate the multiplicity of an association by adding multiplicity adornments to the line denoting the association. The example indicates that a Student has one or more Instructors: Student Instructor 1..* Software Design (UML)

22 Association Relationships (Cont’d)
The example indicates that every Instructor has one or more Students: Student Instructor 1..* Software Design (UML)

23 Multiplicity Association
Multiplicity is described as being one or many. Multiplicity shows how many instances of one class may relate to a single instance of an associated class. Multiplicity shows the number of related objects.

24

25 Class Diagram Intersects Point LINE Name Name

26 Many to Many association & Links
Line(L1) Line P1 Line(L2) Line(L3) Line P2 Line(L4) Line(L5) 26

27 Ternary Association The OMT symbol for ternary association is a diamond with lines connecting to related classes. The name association is written next to the diamond. A person who are programmers use computer languages on projects.

28 Ternary Association and Links
LANGUAGE PROJECT PERSON

29 Multiplicity An association represents a structural relationship among objects. It’s important for you to state how many objects may be connected across an instance of an association. This “how many” is called the multiplicity of an association’s role, and is return as an expression that evaluates to a range of values or an explicit value

30

31 Optional Multiplicity
It is also called as zero or one ,or optional multiplicity.

32 Advanced Link & Association
Link Attribute: A link attribute is a property of the links in an association. It is a property of the objects in a class similar to the attribute. The OMT notation for a link attribute is a box attached to the association by a loop symbol.

33 Fig.Link Attribute Accessible By FILE User ACCESS PERMISSION
Access permission is an attribute of accessible by link.

34 Link Attribute for One to Many Association
Each person working for a company receives a salary and has a job title. The BOSS calculates the performance of each worker.

35 Link Attribute For Ternary Association
A cricketer may play for many teams in a given year. A cricketer may also play many years for the same team. Each team has many cricketers. For each combination of team and year ,a cricketer has record of runs and wickets.

36 ROLE NAMES A role is one end of association. A role name is a name written at one end of association. EX:A person assumes the role of employee w.r.to a company and a company assumes the role of employer w.r.to a person. A role name is written next to the association line near the class that plays the role.

37 We can also indicate the behavior of an object in an association (i. e
We can also indicate the behavior of an object in an association (i.e., the role of an object) using rolenames. teaches learns from Student Instructor 1..* 1..* Software Design (UML)

38 Ordering It is a special kind of facility available in OMD.
It can be considered as a set. Such kind of externally ordered objects are denoted by writing {ordered} on the “many” end of an association. i.e. next to the multiplicity dot for the role.

39 Ordered Sets in an association
SCREEN WINDOW Visible on

40 Qualification The Qualifier is a special attribute that reduces the effective multiplicity of an association.

41 Aggregation An aggregation is a special form of association that models a whole-part relationship between an aggregate (the whole) and its parts. The OMT Notation for aggregation is:

42

43

44 Aggregation is the (*the*) relationship between two classes.
When object of one class has an (*has*) object of another, if second is a part of first (containment relationship) then we called that there is an aggregation between two classes.

45 Examples: A Library contains Books Within a company Departments are made-up of Employees. A Computer is composed of a number of Devices.

46 Example: an Customer has an Address
Example: an Customer has an Address. We use aggregation because the two classes represent part of a larger whole. We have also chosen to model Address as a separate class, since many other kinds of things have addresses as well. An aggregate object can hold other objects together

47

48

49

50

51

52 Object aggregation S t u d y p a c k C o u r s e t i t l e N u m b e r
1 1 1 1 1 ..* 1 ..* 1 ..* 0 ..* A s s i g n m e n t O H P s l i d e s L e c t u r e V i d e o t a p e n o t e s C r e d i t s S l i d e s T a p e i d s . T e x t 1 1 1 ..* 1 ..* E x e r c i s e s S o l u t i o n s # P r o b l e m s T e x t D e s c r i p t i o n D i a g r a m s 52

53 Association is a relationship between two objects
Association is a relationship between two objects. Association defines the multiplicity between objects. You may be aware of one-to-one, one-to-many, many-to-one, many-to-many all these words define an association between objects. Aggregation is a special form of association. Example: A Student and a Faculty are having an association.

54

55

56 Aggregation is a special case of association.
A directional association between objects. When an object ‘has-a’ another object, then you have got an aggregation between them. Direction between them specified which object contains the other object. Aggregation is also called a “Has-a” relationship.

57 Generalization

58 A generalization is a relationship between a general thing and a more specific kind of that thing. Generalization is some times called as “is-a-kind-of” relationship:

59

60 Generalization is the process of extracting shared characteristics from two or more classes, and combining them into a generalized superclass. Shared characteristics can be attributes, associations, or methods.

61 Propogation Of Operations
When the operation is applied to some starting object,the automatic application of an operation to a network of objects is called propogation.

62 A class can inherit features of two or more classes .
Multiple Inheritance A class can inherit features of two or more classes . This is known as Multiple Inheritance.

63 A class may inherit features from more than one superclass
A class may inherit features from more than one superclass. A class with more than one super class is called as a JOIN class.

64 Grouping Constructs Module:- A module is a part of model. A module is a logical way of grouping classes, associations and generalization. Module gives us view of object model as combination of different parts. Class names & association names must be unique within a module.

65 For more detail contact us
Meta Data Meta data is defined as the data that describes other data. For example Database tables are defined for stroing information. RDBMS has several metatables that store table definations. For more detail contact us


Download ppt "Visit for more Learning Resources"

Similar presentations


Ads by Google