Algoma University College
Computer Science 2006
Data Structures I
Fall 1996/97
Assignment #4

Pawan Lingras

Date Due: Week 8

Write a template for list ADT. Test it using a driver program.

Assignment #5

Pawan Lingras

Date Due: Week 9

Write a template for stack ADT. Test it for reversing a string and test to see if it is a pallindrome.

Assignment #6

Pawan Lingras

Date Due: Week 10

Use the template for set ADT given in class to do this assignmnet. Create a type to store a relation on a set of five elements. The relation will have at the most 25 elements. Each element will be an ordered pair of integers. For example, if (1,5) exists in the relation, it means element a1 is related to a5. The relation should be implemented as a set. Add functions to test if the relation is symmetric, antisymmetric, reflexive, and transitive. Write a program that inputs a relation and tests to see if it is an equivalence relation as well as a partial order.

Bonus: Write a binary power operator called ^. The test program should also test the power operator.

Assignment #7

Pawan Lingras

Date Due: Week 11

Rewrite the list and stack ADTs using linked design. Test the driver programs from assignments 4 and 5.

Assignment #8

Pawan Lingras

Date Due: Week 12

Write a template for queue ADT using linked design and test it for theater simulation program from the book. Bonus marks if your simulation incorporates capacity of two theaters and outputs minimum/maximum/average waiting times.