CPSC 2430-02 Programming Assignment #2

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (5 votes)

P2 exercises your understanding of linked lists, dynamic memory and pointers in C++
Do not use classes in this assignment.
Do not use any of the STL (including the vector type) in this assignment.
1) Create an ordered linked list to store integer values.
2) Define routines to:
a. Traverse the linked list
b. Insert an element into the linked list
c. Delete an element from the linked list
3) Test the routines using a random number generator
a. Construct a linked list of at least size 50
b. Traverse this linked list, storing values in an output file called “P2OutputA.txt”
c. Delete the smallest element of the linked list
d. Delete the largest element of the linked list
e. Delete some value in the middle of the linked list
f. Traverse the linked list, storing values in an output file called “P2OutputB.txt”
Name your file p2.cpp and submit by running the following script from the directory where the file is
stored.
/home/fac/sreeder/submit/cpsc2430/p2_runme
.