Adding Method Code
The final step in constructing the class hierarchy is to add method code. You can find the methods by inspecting the programming code that processes the type data. See programming code that uses type codes.
In this example, an Age method was found to apply to everyone in the database. It used the Date of birth and today's date to calculate age. The diagram below shows the Age method attached to the Person class. Also, a method for hiring a new employee is shown along with the method for granting tenure to a professor. There are undoubtedly other methods that can be found. You might also find a different method is necessary for hiring a workstudy person so that the method could be further defined for the Workstudy Class.
Next: Using the data. Also see the related content below.
More on the general topic: Using Existing Relational Schema
- Type Codes
- Using Type Codes to Construct Classes
- Multi-Type Views
- Checking the Class Hierarchy
- Using the Data