SYSC2002_2004_Winter_Booklet

SYSC2002_2004_Winter_Booklet - 2 Question 1 (a): Complete...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2 Question 1 (a): Complete the class declaration. class Deque { private: ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ public: Deque (); ~Deque(); Deque (const Deque &otherDeque) enqueueAtFront (double value); enqueueAtEnd (double value); // both of these methods throw an overflow_error exception if the deque is empty double dequeueFromFront (); double dequeueFromEnd (); int size(); // returns number of names in the deque Deque &operator= (const Deque &otherDeque); }; 3 Question 1 (b): Implement the destructor here. Deque::~Deque () { ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ ____________________________________________________________________ } 4 Question 1 (c): Implement method “dequeueFromEnd” here....
View Full Document

This note was uploaded on 02/24/2010 for the course SYSC 2002 taught by Professor Unknown during the Fall '07 term at Carleton.

Page1 / 11

SYSC2002_2004_Winter_Booklet - 2 Question 1 (a): Complete...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online