Chapter 2 Building an Object-Oriented Model

Visibility

The visibility of a class refers to the way in which it can be seen by other objects. A class that is visible to another object may influence the structure or behavior of the object, or similarly, its own properties may be affected by the other object.

Property

Private

Protected

Package

Public

Visible

Only to the class itself

Only to the class and its inherited objects

To all objects contained within the same package

To all objects in the model

Cardinality

The cardinality of a class specifies the number of instances that the class can have.

Cardinality

0..0

0..1

0..*

1..1

1..*

*

Number of instances

None

None or one

None to an unlimited number

One to one

One to an unlimited number

Unlimited number

Creating a class

There are three ways to create a class:

Create a class symbol in the Browser

Add a new class to the list of classes

Create a class symbol directly in a diagram

21

Page 31
Image 31
Sybase 7.5 manual Creating a class, Visibility, Visible, Cardinality Number of instances