CIS 327 Lab 4

Points: 30 Due Date: Wednesday September 10, 2003

This will mean working with a list of characters as in class. I have made a smaller version of the list code that you can use as your base. I have packaged it as a MSVC++ project in a folder (lab4ex.zip). Along with this is an executable that is a solution to the problem.

You will add three new functions to the set that is already there. The first takes a list pointer as an argument and changes all the letters to uppercase.

The second will take three args. The first is the list pointer, the second is a target letter and the third is the new letter. It should search the list and change every occurrence of the target letter into the new letter.

The third function will concatenate two strings. It will take two pointers as arguments and returns a pointer. It will add the seond string to the end of the first string. SO if the first list pointer points to a character list containing the letters "hello", and the second contains "there", after the concatenation, the first one should contain "hellothere".

You should write a main program that demonstrates that all these functions work. You should catch obvious errors in the functions.

Spend a lot of time thinking before you write. There are ways to solve this that are simple to write, once you think of them and ways that are simple to think of but hard to write.

Deliverables:

You should turn in a listing of the program. Staple the cover sheet to that.

Notes

Start as soon as you can, pointers are quite tricky and can be confusing. Think about how you will do this so you can ask questions during lab.
ASK if you have any questions.