Sunday, March 25, 2007

March 27

A.Objective: Get more comfortable with classes: defining constructors with arguments.

B. Program: Here are my files:
Click to see :Header File
Click to see:CPP File
Click to See: File with output
Scroll all the way to the end of the file to view the output.

C. Comment
In this program, I used an array of my class object to store my various friends, names and university names It took me a while to figure out how to define the constructor. I kept running into problems with the syntax in two places: where I had defined my constructor (.h) and where I had declared my array of the friends class (.cpp). I also originally started out with a fourth category of information, my friends' phone numbers. However, I was having problems because it is so many digits. So, I tried creating an array of ints to hold the numbers, but I still got many errors and therefore decided to tackle that another day.

No comments: