Object Modelling & Dynamic Modelling (Unit 1)
Object Modelling & Dynamic Modelling (Unit 1)
Object Modeling: Objects and classes, links and association, generalization, Specilization
inheritance,aggregation, abstract class, meta data, candidate keys, constraints.
Dynamic Modeling: Events and states, operations, nested state diagrams and concurrency,
advanced dynamic modeling concepts, a sample dynamic model.
Object:-
The object in a class , contains some data values , called attributes. Such as name, age and
weight are the attributes of person objects. Each attributes has a value for each object
instance.
For example: attributes age has value 34 in object Ram. . it means Ram is 34 years old. The
different object instance may have the same or different values for a given attributes.
Class:-
A class describes a group of objects with some properties (data structure or attributes),
common behavior (methods or operation) common relationship to other objects, and common
semantics . In fact , objects are instances of the type class. Each object is associated with the
data of type class with which they are created.
Links: In object modeling links provides a relationship between the objects. These
objects or instance may be same or different in data structure and behavior. Therefore a
link is a physical or conceptual connection between instance (or objects).
For example: Ram works for HCL company. In this example “works for” is the link
between “Ram” and “HCL company”. Links are relationship among the objects(instance)
Types of links:
Degree of association:
1. Unary association(degree of one)
2. Binary Association (degree of two)
3. Ternary Association (degree of three)
4. Quaternary Association (degree of four)
5. Higher order association (more than four)
Bird
B1 B2 B3
aggregation
the aggregation is an extension of association mean aggregation is a strong form
of association in which an aggregate object is made of components.
Components are part of the aggregate. Thus aggregation is the “part-whole” or
“a-part-of” relationship.
For ex: keyboard is a part of computer or we can say key are parts of keyboard.
abstract class
An abstract class is a class that is declared abstract—it may or may not include
abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.
If a class includes abstract methods, the class itself must be declared abstract, as in:
public abstract class GraphicObject {
// declare fields
// declare non-abstract methods
abstract void draw();
}
First, you declare an abstract class, GraphicObject, to provide member variables and
methods that are wholly shared by all subclasses, such as the current position and
the moveTo method. GraphicObject also declares abstract methods for methods, such
as draw or resize, that need to be implemented by all subclasses but must be
implemented in different ways. The GraphicObject class can look something like this:
abstract class GraphicObject {
int x, y;
...
void moveTo(int newX, int newY) {
...
}
abstract void draw();
abstract void resize();
}
manufacture owner
Company person
Candidate keys
Candidate key is a term commonly used within the data base community,
However , candidate key is a really not a database concept. Candidates key is a
logical concept.
“Candidate key is a minimal set of attributes that uniquely identifies an
object.”
Constraints
Constraint defines some functional relationship between entities of an object. The
term entity includes objects , classes , attributes , links and association., It mean
constraints can be implemented on the objects, classes , attributes , links as well
as on association too.
1. Peroson
Own stock
Compay
2. person
Works for
company
3 Country
Has Capital
City
Operations
Self Prepared
Nested state diagrams
Self Prepared
Concurrency
Self Prepared