CS 202 Fall 2013 > Assignment 7 |
CS 202 Fall 2013
Assignment 7
Assignment 7 is due at 2 p.m. Monday, November 25. It is worth 30 points.
Procedures
Complete each of the exercises below. Then turn in your work as follows.
- Run Check. Demonstrate the programs you have written for the exercises below to either the instructor (Glenn G. Chappell) or the T.A. (Zak Williams). Get official approval.
- Submission. Submit your code using Blackboard, under Assignment 7 for this class. You should only submit code that has already passed the Run Check. Be sure you attach your source/header files; do not paste them into the text box. Also, send only source & headers; no project files or executables.
We may not look at your homework submission immediately. If you have questions, e-mail me.
Exercises (30 pts total)
Do each of the following exercises. Coding standards are as on Assignment 3.
- From the Chapter 17 Programming Challenges (p. 1039),
do exercises 5, 6, and 7, with the following changes.
- Instead of “the linked list class you created ...”
modify class template
List1
, defined in filelist1.h
, found on the class web page. - Write a driver program that demonstrates all three functions (search by value, insert by position, remove by position).
List1
should continue to work as before. In particular, all nodes must be allocated withnew
. If a node is removed from a list, then it should be deallocated (delete
a pointer), but no other node should be deallocated.
- Instead of “the linked list class you created ...”
modify class template
- From the Chapter 9 Programming Challenges (p. 537),
do exercise 2, with the following changes.
- Instead of a dynamically allocated array,
store the data in a Standard Library
list
container.
list
, but it is not via global functionsort
.
- Instead of a dynamically allocated array,
store the data in a Standard Library
CS 202 Fall 2013: Assignment 7 /
Updated: 19 Nov 2013 /
Glenn G. Chappell