Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Provide a linked list implementation of queue of integers. Provide a constructor that creates an empty queue. Provide a destructor that destroys the queue. Provide

Provide a linked list implementation of queue of integers.

  • Provide a constructor that creates an empty queue.
  • Provide a destructor that destroys the queue.
  • Provide a function that inserts a value at the rear of the queue.
  • Provide a function that removes (deletes) the value at the front of the queue and returns the value.
  • Provide a function to check whether the queue is empty.

Separate your class definition from implementation. Create a header file Queue.h for the class definition and create Queue.cpp for the implementation. Create a driver program wk9.cpp to test all functions of your class.

Grading

At this point in the quarter, you should not need reminding to design your program/class in a functional decomposed way (or in modules). Make sure you are using appropriate private utility functions within your Queue class. You will be graded eventually (see HW#5) based on how well your class is functionally decomposed or modular (see rubric).

At this point in the quarter you should have mastered commenting with pre and post conditions in the header file. This is also being mentioned here as we have talked about their importance as it relates to software testing in lecture. You driver should test to these pre and post conditions.

The assignment will be graded in accordance with the Labs and Programming Assignment Expectation handout and the rubric posted on Canvas. Failure to adhere to the guideline could result in losing points.

Writing your driver or main() function

Provide well thought out test driver code or main() test program to test the capabilities of your Queue class. It is your job to demonstrate functionality of your class and member functions in the driver. SHOW through various calls to ALL the functions you wrote that your Queue class works beautifully. Do not prompt the user for values. Your driver should have all the numbers and information embedded inside the driver to thoroughly show that your Queue class works. (For example, your class files could then be passed to another programmer who will then use your class in a larger application because now we all know it works through your driver testing it!)

Submitting your Program

You must submit three files:

  • The header file: Queue.h
  • The implementation file: Queue.cpp
  • The driver program: wk9.cpp

On cs1, run the following script in the directory with your program:

/home/fac/lmilkowski/1430scripts/1430_wk9_submit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learn To Program Databases With Visual Basic 6

Authors: John Smiley

1st Edition

1902745035, 978-1902745039

More Books

Students also viewed these Databases questions