At first let's have a look at the department class, defined in exercise 3.3:
Department in Class with
attribute
head: Manager
end
There is a link between Department and Manager of category attribute with label head at the class-level. Now we have to establish a link between Production and Lloyd of category head at the token-level. The label of this link must be a unique name for all links with the source object "Production". We choose head_of_Production as name.
The resulting Telos frame is:
Production in Department with
head
head_of_Production : Lloyd
end
Exercise 3.4:
Add this information to the object base.
Use "LloydsSalary", "PhilsSalary", etc. as labels.
(Remember that you can load an existing object from the object base into
the Telos Editor by using "Load frame".)
The destination objects of attribute instantiations must be existing objects in the database or instances of the system builtin classes Integer, Real or String. Objects which instantiate these classes are generated automatically when referenced in a Telos-frame. At this point it is important to recognize, that attributes specified at the class level do not need to be instantiated at the instance level. On the other hand an instance of a class containing an attribute may contain several instances of this attribute.
Example:
George in Employee with
name
GeorgesName: "George D. Smith"
salary
GeogesBaseSalary : 30000;
GeorgesBonusSalary : 3000
end
The attribute dept and boss have no instances, while salary is instantiated twice.
To complete the token level, we have to add more employees to
the object base.
Exercise 3.5:
Add the following employees to the object base
Use MichaelsDepartment etc. as labels for the attributes.
Now the first step in building the example application is completed. The next chapter describes a basic tool of the usage environment which can be used for inspecting the object base: the GraphBrowser.