![]() Previous |
![]() Contents |
![]() Next |
This part deals with problems arising from the need to extend the existing capabilities of a program as part of the maintenance process. The object-oriented design approach using abstract data types which was described in the previous part simplifies many maintenance problems where the services provided by individual objects comprising a program need to be reimplemented to meet changing requirements such as a change in the user interface. However, it assumes that the set of services provided by each type of object will remain unchanged. What it doesnt address are issues arising from maintenance problems which require an extension to the services provided by a particular type of object.The ability to extend the capabilities of existing data types by inheritance is an essential feature of object-oriented programming languages, and the main changes between Ada 83 and Ada 95 were in the area of support for object-oriented programming. This part shows how the object-oriented facilities that Ada 95 provides can be used to improve the designs of the examples from the previous part to make them easier to extend. The appointments diary is extended so that it can handle a variety of different appointment types, including any we may care to add in the unknown future, and the calculator is redesigned so that new types of operators or operands can be added or the syntax of expressions can be changed. The new improved calculator is then extended for use as a building block for a spreadsheet, and finally the spreadsheet itself is extended to accommodate multitasking capabilities.
![]() Previous |
![]() Contents |
![]() Next |
This file is part of
Ada 95: The Craft of Object-Oriented Programming
by John English.
Copyright © John
English 2000. All rights reserved.
Permission is given to redistribute this work for non-profit educational
use only, provided that all the constituent files are distributed without
change.