Tute Exercises Week 10
This week's tute and lab exercises are based on the address book example
discussed in the lecture.
The following interfaces and (incomplete) modules implement the
module structure for the application as discussed in the lecture.
- Which modules will be affected if we extend the definition of
- In the current version, Address is exported with its
constructors, since the user interface module needs the
informations to construct, read and print addresses. Assume an
address will always consist of at least first name, last
name and telephone number. Change the interface of
AddressDB such that altering the definition of
Address does not directly affect other modules. What are
the disadvantages of such a solution?
- Design a new type Address which, in addition to the
fields of the current type, has the following optional
and provide functions to set these fields.
- Street Name and number (as one string)
- Post code