next up previous
Next: Defining Attributes of Classes Up: Editing Telos Objects Previous: Editing Telos Objects

The Class Level

The first step is to create the three classes used: Employee, Manager and Department. Enter the following definition into the top-window of the CBworkbench:

Employee in Class
end

This is the declaration of the class Employee, which will contain every employee as instance. Employee is declared as instance of the system class Class, because it is on the class level of our example, i.e. it is intended to have instances.

To add this object to the object base, press the Tell button. If no syntax error occurs and the semantic integrity of the object base isn't violated by this new object it will be added to the object base. The next class to ad is the class Manager. Managers are also employees, so the class Manager is declared as a specialization of Employee using the keyword isA:

Manager in Class isA Employee
end

Press the Clear button to clear the editor field. Enter the telos frame given above and add it to the object base by telling it. The final class to be added is the class Department.

Exercise 3.1:
Define a class Department and add it to the object base.

At this point we have added some new classes to the object base, but have told nothing about the so called attributes of these classes. The modification of the classes we have just entered is the next task.



ConceptBase Team