CPSC 211, Sec 201-203
Spring 2004
Program 4: Implementing Fraction and MixedNumber ADTs in C


INSTRUCTIONS


PURPOSE

This assignment is to redo Program 2 in C. It will give you more practice with abstract data types and a little with recursion. This assignment is taken from Data Structures and Abstractions with Java, by Frank M. Carrano and Walter Savitch, Prentice-Hall, 2003.

REQUIREMENTS

  1. Recast your specification of the Fraction class from Program 2 as a specification of an abstract data type (independent of programming language). This should not require many changes.

  2. Implement your Fraction class in C. Refer to the hints from Program 2.

  3. Recast your specification of the MixedNumber class from Program 2 as a specification of an abstract data type (independent of programming language). This should not require many changes.

  4. Implement your MixedNumber class in C. Follow the instructions from Program 2.

  5. Be sure your program runs on the CS department's Unix machines when compiled with gcc!

TURN-IN REQUIREMENTS

Due by 10:20 AM on Wednesday, March 3: