Department of Engineering

IT Services

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.