[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Input/Output Up: More on Classes Previous: Redefining ->

Exercises

1.
Write a program to demonstrate the effect of making a routine virtual.
2.
Write a class to deal with dates. Have fields for the day, month and year, a print function, and a way to add an integer to a date to get a future date.
3.
Write a class to deal with rational fractions - addition, multiplication, input and output.



Tim Love
2001-07-05