The procedure is pretty simple. Save the buggy C++ source code that you find at this link as plain text. Call it campaign.cc just so that we can refer to it by that name throughout this document. Save it onto your H: Drive, because we will be using that to do all our work.
Then open up another window on your workstation and log into one of the cc machines. Do this by going to the "Start" menu and going to the "Run" option. This should right at the bottom of the list of options. In that window, type "telnet xxx.cc.gatech.edu" to start a session on the cc system. This "xxx" part will be the system you use for reading mail from your cc account, which most likely is lennox or gaia. If you aren't sure how to do this, ask your neighbors or the TA.
If you feel that you need extra help, here are a couple of links here that should be useful. The first one is a C++/SmallTalk comparison . The second one is an on-line C++ tutorial.
It will be helpful If now you grab a sheet of paper and draw the diagram describing the classes in this program. Look at this diagram and see if you can spot some of the things wrong with this source code.
You don't have to read everything in the comparison file. Just glance over the important stuff, and if you know C++ already, you may not have to read it at all. It's more of a refresher.
After you have spent the time looking and drawing, dig into the code. Try compiling it (see below). If it doesn't work, fix what you think is wrong with it, and try again. Always try to fix the top error first, because it may also be causing errors underneath it. Lather, rinse, repeat. There are a number of debugging techniques that one can learn and derive along the way, but this isn't really the time or place to go into that.
This program has a number of syntactic errors. If you can fix it and make it compile, it should work correctly, because there is no logic error in this lab. However, if you change the code too much, you may enter in additional errors yourself that aren't there.
/usr/local/bin/g++ -o campaign campaIgn.cc
campaign
If you did that and had the compiler print a whole bunch of lines on your screen, then the program still has compile-time errors in it. Try to interpret the error messages, edit the source, and try again.
To accomplish this on your CoC account, you can use the "script" program to gather this information. Here are the steps:
You now have a copy of the output to work with. There are two ways to paste this into the turnin page. The easiest way is to copy and paste directly from your cc account. To do this, type "more output.txt" at the prompt. This will display your output file screen by screen. Just copy and paste each screen that you see. Use the spacebar key to move between screens.
The other way is to go into NT and start up Notepad. The easiest way to do this is to use the "Start" menu again and choose the "Run" option. Just type "notepad" to start the program. Then go to "open file", and change directories to your H" drive. Find the output.txt file and open it. Copy and paste as usual.
You can now Turnin your code by going to the turnin page for your appropriate section:
http://minnow.cc.gatech.edu/cs2390w98a -- (Section A)
http://minnow.cc.gatech.edu/cs2390w98b -- (Section B)
http://minnow.cc.gatech.edu/cs2390w98c -- (Section C)
http://minnow.cc.gatech.edu/cs2390w98d -- (Section D)
http://minnow.cc.gatech.edu/cs2390w98e -- (Section E)
http://minnow.cc.gatech.edu/cs2390w98f -- (Section F)
You will be prompted for a user name and password. Your user name is your name as it appears on the CS2390 Home page. Your password is your 9 digit social security or Student ID number WITHOUT DASHES!.
Click on the Turnin new project link. Select Lab 6 in the Assignment menu.
You will now paste the code into the text area of the turnin web page. Click on the Turnin button and you are done!
News Page | CS2390 Win'98 Home Page | CS2390 CoWeb | STABLE | BOOST
Questions/comments/concerns to guzdial@cc.gatech.edu
Page last updated 2/18/98; 9:26:13 AM