[   ^ to index...   |   <-- previous   |   next -->   ]

Class design exercise

Part 1: Interface design

Let's say you wanted to create a class to implement a date (e.g., 14 July 1789). Write a class definition for Date objects. First, decide what the member functions and constructors should be. Then, determine what data fields should go into a Date.













Part 2: Implementation

How did you represent a Date? How would the member functions need to be implemented to accommodate this representation?















Relevant reading: Carrano-Helman-Veroff ch. 3; course packet sections E-F.


Last modified: Mon Jun 26 22:25:01 PDT 2000