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
- 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.
- Implement your Fraction class in C. Refer to the hints
from Program 2.
- 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.
- Implement your MixedNumber class in C.
Follow the instructions from Program 2.
- 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:
- Turn in your code using the "turnin" program in the CS department
Unix machines.
(Turnin instructions available here.)
- Turn in your paper specification documents, testing documentation and
cover sheet in class.