1 C does not support data abstraction or generic abstraction. Nevertheless, it is possible to build a library of C program units that achieves some of the benefits of data abstraction and generic abstraction.
(a) Show how you would write a C program unit that achieves the effect of an abstract type. The program unit should provide a named type (such as Date), together with some operations on that type, without revealing how that type is defined.
(b) Now suggest how you might achieve the effect of agenericabstract type. You must enable a program unit that implements a generic abstract type (such as List) to be instantiated as required. Application programmers should be able to link these program units to their programs. What software management tools would be needed, in addition to the C compiler?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here