Saturday, May 5, 2007

STL Lists

A. Objective: Continue studying for the exam. Tackle the wonderful world of the STL linked list. Soooooo much easier than creating one from scratch.

B. Program:
Complete program with output

C. Comment:
This was basically a chance to redo the last lab. I created a list of strings and then opened a file to read the story from. I display it to the screen, sort it, reverse it, remove the repetition from it. I wish everything could be done with this much ease.

Wednesday, May 2, 2007

2D Array Operations

A.Objective: Practice my programming skills for the final. 2D Array Problem #18 p. 451

B.Program:
The Code

C.Comment:
Not having worked with a 2D array in a very long time, I had to use the book to jog my memory. Luckily the book had most of the code I needed and what it didn't, just required a little tweaking to get what the problem asked for. The display isn't all that pretty, but it gets the job done.

Lowest Score Drop

A.Objective: Practice my programming skills for the final. (2)Programming Challenge from Chapter 6

B.Program:
The Code

C.Comment:
This program took a little more thought. Also in order to follow their instructions, this program isn't written in the most practical way possible. There are things that could have made it shorter, such as putting the scores in a vector. This way it could have sorted it for me and found me the lowest score without all the if statements. I am proud of the way, I figured out how to calculate the average. The thought came to me, before I fell asleep.