Class 1
Class 1
Class Modeling
Objects
The purpose of class modeling is to
describe objects
An object is a concept, abstraction or thing
with identity that has meaning for an
application
The choice of objects depends on judgment
and nature of a problem; there can many
correct representations
All objects have identity and are
distinguishabe
Classes
A class describes a group of objects with same
properties, behavior, kinds of relationships and
semantics
The interpretation of semantics depends on the
purpose of each application and is a matter of
judgment
Objects class are determined at run time.
By grouping objects into classes, we abstract a
problem. Abstraction gives modeling its power and
ability to generalize from a few specific cases to a
host of similar cases. We can write operations once
for each class, so that all objects in the class benefit
from code reuse
Class Diagrams
Class diagrams provide a graphic notation for
modeling classes and their relationships, thereby
describing possible objects
They are useful for both abstract modeling and
for designing actual programs
Object diagrams shows individual objects and
their relationships
They are useful for documenting test cases and
discussing examples
A class diagram corresponds to an infinite set of
objects
Class
Stude
nt
Objects
Ram :
Student
Seema :
Student
Perso
n
Name : String
Birth_date: date
Ram:
Person
Name = Ram
Birth_date = 21
october 92
UML Notation
GeometricOb
ject
Color
Position
ClassName
attributeName1 : dataType1 =
defaultValue1
.
operationName1 (argumentList1) =
resultType1
.
.