Lecture 10 – held in 250 lab
We looked at an
We looked at
We also looked at
an
Note: The links to
these 3 files point to Word documents so when you save them you can’t directly
load them into jGrasp.
Then we looked at
how to output floating point numbers in non-exponential
form. testFloatOutput.
After class a
student asked about a compile time error message they were getting which was
generated bcause
We spent the rest
of the class discussing a QUEUE data structure.
We decided that we
needed the operations (i.e. procedures and/or functions) to
Make the queue empty
Test the queue for fullness
Test
the queue for emptiness
Add
something to the queue ENQUEUE
Delete
something from the queue DEQUEUE
Look
at the front (head) of the queue & perhaps
look at the back (tail) of the queue
We
need two indexes head and tail (in the
STACK we only needed one which we named top)
We then traced
through an example showing what the results of each operation would be.
Your assignment
for Tuesday, October 3rd is to write three (3) pieces of code
A specification for a QUEUE
An implementation for a QUEUE - implemented as an array
A test program yourname11
to see that your specification and
implementation work