Lecture 13 - October 8, 2007

 

Handed back the results of running discrete_Set test programs and discussed good tests missing from some programs

 

We spent time implementing a few of the functions and procedures in the body of the specification

 

We talked about three different ways of implementing queues (two besides the current one) and what is needed in each

  1. If  implementing as an array - helpful to have SIZE - requires a lot of movement of data
  2. If implementing as a circular array -  need a HEAD and a TAIL -
  3. If implementing as a linked list - must have a HEAD - having a TAIL shortens the time for insertions

 

We discussed that after writing the test program for the queue implemented as an array (1 above), that we will be writing other implementations (2, and 3 above) which can be tested by the identical test program.  THINK ABOUT THAT!

 

We discussed that a Queue is a FIFO (first in first out) data structure.

We learned that a Stack is a LIFO (last in first out) data structure.

We listed the sub-programs that a Stack ADT would need

NOTE: removeFromStack comes in two flavors

 

We mentioned other data structures that we will learn about

 

Next time:

          We will talk about how to declare our own exceptions

          We will talk about BIG-O notation