Phase 1 of Final Project  
 
 

Final Project: Phase 1

Readings:

There are no readings for this part of the project.

Key Concepts:

More linked lists.

Cryptology Program:

The first phase of the final project involves updating some code you already have in preparation for other parts of the final project. There are two parts:

First, update the LinkedList.cpp program from last week by modifying it so that, instead of making a new node regardless of the data being entered, if the data is already in the list it adds one to an integer variable in each node keeping track of the number of times that node's data has been entered into the list.. Note that this will require you to adding a variable to the Node class so that each node keeps track of not only its data, but how many times that data has been entered into the list. It will also require you to modify the insert() function. In addition, add a function called remove() that takes a char variable as a parameter and deletes the node in the list that contains that char as its data. If that data is not contained in he list simply let the user know that. Note: remember to actually deallocate the memory used for the node you are removing with the delete command. Finally, add a function called max() that takes no parameters and returns the data appearing most frequently in the list (i.e.\ the data whose node has the highest count). Break ties as you wish.

Next, update the Translator.h program to include two new functions. One, called get_index() should take a letter (char) as a parameter and return that letters integer index. For example get_index(`b') should return 1. The other, called get_char() should take an integer parameter and return the associated character. For example get_char(1) should return "b". Assume in both functions that the user enters proper input.



Files to Be Downloaded