This program will provide an opportunity to build an application that utilizes a linked list data structure.
Write a program to manage a list of computer-related problems for a help desk application. This will be a file-driven program that involves addition to and deletion from a linked list of "problem" objects.
Create a class to store one Problem. Data members should include:
Three files of problems are included for this solution. The file format is:
Assume scenario that includes a current list of problems, a list of problems recently solved, and a third list of new problems not yet tasked. The three files are:
In addition, a file is provided that allows the problem code to be decyphered to a specific problem description:
Define a class (assume named ProblemList) that has-a ordered linked list of Problem objects as a member (bad grammar intentional). Use of an "templated" ordered linked list does imply that the data type used in the template enables ordering (i.e. defines the < operator among others). Be sure to overload the operators necessary for this feature. Your problems will be ordered within the list by priority code and date. For any two problems having the same criticality level (1 being highest), declare the problem having the earliest date as the higher priority.
Your overall object oriented design should allow you to practice abstraction and limit you driver program to the following (assuming your class is called ProblemList):
problems += newProblems;
problems -= solvedProblems;
In addition to other features, this solution implies overloading operators <, ==, and != for your Problem class
and += and -= for your ProblemList class.
Finally, your output should be a list of problems to solve (the top 25 in the list) and the problems that you'll not likely ever get to (the bottom 25). Therefore, include two member functions of your ProblemList class: writeTop(n) and writeBottom(n). These will list the n Problem objects at the top of the list and the n objects at the bottom, respectively.
Your lists could be a simple sequential listing like the following.
Priority Submitted By Description
1 4/25/2013 Jane Doe Hard drive crash
... and so on down the list in order ...
File needed: orderLinkedList.h (Hint: There should be no need to change the linked list class for this solution).
Deliver the following as your final product:
CST 280 2 pts
In-Class Assignment 11b
Assume the following list of elements (ordered alphabetically) are inserted into a binary
search tree in the given sequence.
H C R A S Q B F Z M D X
a) Sketch the initial resulting binary search tree:
b) Referring to the tree in (a) describe the sequence of "visits" to nodes as the
tree is traversed in:
c) Sketch the tree after all of the following changes are made (assuming the
strategy for deletion is used that was discussed in class):
Tree from part (c):
d) Referring to the tree in (c) describe the sequence of "visits" to nodes as the
tree is traversed in:
e) Access the following files from the course web page: binTreeType.h,
and text file testTree.cpp. Verify your results using the tree class
presented in class.
Deliverables: This page, your source code and output.
CST 280 In-Class Practice – Week 12
Access the following files from the course Week 12 practice file access page
(using code bn23):
Add following functions to the tree class treeDepth()and getDepth().
return getDepth(root) - 1; // Subtracting root as level zero
// Private function checking maximum depth below current node
int BinTreeType<ItemType>::getDepth(TreeNode* tree)
if (tree == NULL)
// Get depths below current node
int leftDepth = getDepth(tree->left);
int rightDepth = getDepth(tree->right);
// Return max depth of subtrees plus one for "this" node
if ( leftDepth > rightDepth)
return leftDepth + 1;
return rightDepth + 1;
The provided driver program depthAnalysis.cpp will demonstrate typical tree
depths based on the number of nodes entered. This program generates a variety of tree
sizes using random integers before returning the maxium depth of the tree.
Deliverables: The source code and output.