Date Structure and Program Design

profilemaak

1.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.  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.

    • 9 years ago
    • 20
    Answer(2)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      maak.rar

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      pen.rar
    Bids(1)