Classes

 

A class represents an entity within the system which models a real-world object.  School, Student and Course are all examples of classes.  A class is made up of attributes and operations.  Often you will see operations referred to as methods.

 

Attributes:

Attributes define the information that each class knows about itself.  In the example above, each school has a name and an address.  In the UML, attributes are shown in the following format:

 

visibility: name: type = default value

 

The visibility indicates whether the attribute is public (+), private (-), or protected (#).  In Visual Case, you must specify the name and the visibility.  The type and the default value are optional.

 

How do I set up class attributes?

Operations:

Operations are processes that a class can carry out.  In our example above, the school class has two operations specified: getName and setName.  The getName operation returns the schools name.  The setName operation changes the school's name to the value of the input parameter "name".

 

How do I set up class operations?

 

Related Topics: