Project 2: Implement and Test the sequence Class Using a Dynamic Array (Chapter 3 and 4)

$35.00 $29.00

The Assignment: You will implement and test a sequence class that uses a dynamic array to store data items. Purposes: Ensure that you can write a small class that uses a dynamic array as a private member variable. Before Starting: Read all of Chapter 3 and 4. Study the implementations of the sequence class using…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

The Assignment:

You will implement and test a sequence class that uses a dynamic array to store data items.

Purposes:

Ensure that you can write a small class that uses a dynamic array as a private member variable.

Before Starting:

  1. Read all of Chapter 3 and 4.

  1. Study the implementations of the sequence class using a fixed-sized array discussed in chapter 3.2 and the bag class using a dynamic array in chapter 4.3.

Files that you must write and turn in (Please do not turn in other files!!):

  1. sequence2.h: The header file for the sequence class. Actually, you don’t have to write much of this file. Just start with the textbook version (http://www.cs.colorado.edu/~main/chapter4/sequence2.h) and add your name and other information at the top. If some of your member functions are implemented as inline functions, then you may put those implementations in this file too. There is a DEFAULT_CAPACITY constant in the head file, which provides the initial size of the array for a sequence created by the default constructor.

  1. sequence2.cxx: The implementation file for the sequence class. You will write all of this file, which will have the implementations of all the sequence’s member functions.

Other files that you may find helpful (please also include them in your submission):

  1. sequence_test.cxx: https://www.cs.colorado.edu/~main/projects/sequence_test.cxx The file was originally written to test the sequence implementations using a fixed-sized array in Chapter 3. You will need to make the following changes to make it work for your project:

Change

#include “sequence1.h” to

#include “sequence2.h”

And change the statement

using namespace main_savitch_3 to

using namespace main_savitch_4

  1. sequence_exam2.cxx: http://www.cs.colorado.edu/~main/chapter4/sequence_exam2.cxx A non-interactive test program that will be used to grade the correctness of your sequence class.

Project 2: Implement and Test the sequence Class Using a Dynamic Array (Chapter 3 and 4)
$35.00 $29.00