next up previous
Next: The class ApartmentOwner: representation Up: Unit 07 Previous: Example: sums of the

Exercise: apartment owners

Specification:

Realize a Java class whose objects maintain some information on the owners of apartments. Each object of the class should contain a string that indicates the name of the owner, and an array of 10 slots of type string, indexed by the numbers from 0 to 9, that can contain each the address of an apartment owned by that owner (or null, if the slot is empty). The class should export the following functionalities:


next up previous
Next: The class ApartmentOwner: representation Up: Unit 07 Previous: Example: sums of the