need urgently...in 8 hours

profileProf.Bella ambrose
project4.pdf

COMP 182, Data Structures and Program Design

Project 4

Due April 2, 2015

1. (30 points) Write a reference-based implementation of a queue that uses a linear linked list to represent the items in the queue. You will need both a head reference and a tail reference. When you are done, compare your implementation to the one given in this chapter that uses a circular linked list with one external reference. Which implementation is easier to write? Which is easier to understand? Which is more efficient?

2. (20 points) Define and implement a class Pen that has an instance of Ball as one of its data

fields. Provide several members for the class Pen, such as the data field color and methods isEmpty and write.