University of Utah School of Computing
CS 2420:
Introduction to Computer Science II
Homework 6
Assigned: Friday, Oct 10, 2014
Due: Monday, Oct 27, 2014, at 3pm.

Homework 6

Part I: Implement Stacks and Queues

Implement an ArrayStack, ArrayQueue, ListStack, and ListQueue. For the array versions, your stack/queue should be able to reach arbitrary sizes, but should never have more than three-quarters of the array empty. That is, you'll want to double the array size when you run out of space and shrink it when the amount of data decreases. These classes should be generic.

Part II: Run Timing Experiments

Push/enque and pop/dequeue inputs of different sizes into your array and list stacks and queues. Plot the resulting runtimes and draw some conlusions.

Part III: Written Homework

What to hand in

No need for a webpage this week. Use the CADE online handin system to handin your source code. Please zip and handin your entire project directory (including an info.txt file). If you work in a team only one of you need to submit the source code. Handin the written homework during lab.

Grading

Each homework assignment will receive a grade out of 100 points. This week, the available points will be broken down like so:
  • 40 points: Stacks and Queues
  • 15 points: Timing results
  • 10 points: Comments describing the class, each method as well as the interesting pieces of the code itself
  • 10 points: Elegence of programming
  • 25 points: Written Homework