Programming Journal Directions Every student will need to submit a ``programming journal'' with every project for this course. The journal will help both the instructor and the student understand the procedure the student went through to complete that project. The journal must have an entry for every day inclusively between the day the project was assigned and the day that the student submitted the final version for grading. Each day the student should either report that he/she ``did not work on the project today'' or report the problems and/or solutions of that day along with an estimate of the time spent that day. The journal will not be used in any way to punish the students for having difficulty while completing the project - acknowledging the difficulties and resolutions is the necessary step in having a useful journal. The journal will be reviewed after the project has been graded and given a grade on a scale of 0 to 10 based only on the completeness of the information contained in it. These journals will not be graded as if they are papers, so sentence fragments and/or grammatical errors will not be a problem as long as the information is intelligible. You should document all problems or errors you encounter as well as any insights or revelations you come across while working on the project. * Machine problems * Problems understanding the description of the assignment * Syntax errors * Semantic errors * Programming environment problems * Understanding the purpose of a part of the C++ language * Emotional reactions of frustration or joy (please be as civil as possible) * The process you used to solve your problem After completing a project, you might find it interesting to go back days or weeks later and look at not only what mistakes you made, but possibly try to determine why you think you made them. Example programming journals Example 1 {I am using Visual C++ for program development} 8/8 didn't work on the project today 8/9 1:00 - 1:30 Read through the description and copied the files necessary to do this project 2:00 - 4:00 Started typing header files and a partial main.cpp to check the header files. Got error C1004 which according to the MS Help could mean that one of the header files was missing a #endif. Used grep to determine if all of the header files were good. All of them had the needed #endif, but some did not have a blank line as the last line. Once the blank line was added the main.cpp compiles except for a double to float warning. Need to: decide to cast or change types to get rid of this warning. 8/10 12:15-1:00 pm Started implement of phone.cpp assuming other modules were done including compile with some of larger function just sketched as comments in their bodies. Got Error: ``unexpected class XXX'' at the constructor. With help from the TA, found out that if you give a default value for a parameter, you have to give a parameter name as well. (Which matches ANSII standard on this VC or GNU?) Other notable syntax error: personal.getrate() as opposed to personal::getrate(). phone.cpp compiles, but when compiling the whole project - personal::rate was unresolved so it needed to be added to my personal.cpp file. Project then compiled fine. Example 2 {I am using Visual C++ for program development} 08/08 Didn't work on the project today. 08/09 2:15p- 3:00p 2:15 Started typing up header files to get overview of things to implement and writing main driver 2:30 First partial compile of main.cpp (just to check that the headers are correct) 2:32 Error - (C1004)unexpected end of file in ``phonenumber.h'' - syntax in the file looks fine. 2:47 Looked in MS Help for C1004 to get ideas. One thought is a missing #endif somewhere 2:49 Since the error points to an #endif, I decided to log on to my WAM account and do a quick grep to make sure all the header files have an endif - they do.... 2:51 Went back to help and found the fact that you have to leave a blank line at the end of a file in Visual C++ 2:53 Found a few files where #endif was last line rather than a blank line 2:56 Compiles main.cpp happily except for a double to float warning. Have to decide if I want to cast that or change the parameters 08/10 12:15p- 1:00p 12:15 Started implementing phone.cpp assuming all other modules had been written 12:36 Did first compile of phone.cpp with some of the more involved functions just sketched out with comments in their body. Using a string to hold the name of the logfile makes it a little trickier to use the builtin file open command. Decided to change parameter to char*. 12:40 Got the ever mysterious ``unexpected class XXX'' at the constructor. This is always due to some syntax error, but nothing jumps out at me yet.... 12:42 Fun one - in Visual C++, if you give a default value for a parameter, you have to give a parameter name as well. Might be worth looking into seeing which is following the ANSII standard - VC or GNU. 12:46 A few more syntax errors (mostly typos). One I need to pay more attention to avoid is that I tried to use the getRate() member of the personal class using '6personal.getRate()'9 instead of '6personal::getRate()'9 12:47 phone.cpp compiled 12:49 Decided to try full project compile with what I have so far 12:50 Weird error coming up on personal::rate. It says it'9s unresolved. 12:56 After adding more explicit references to personal::rate didn'9t work, I looked at the code again and realized that I had never actually created and initialized '6rate'9 in my personal.cpp file. 12:57 Compiled. Example 3 {I am using g++ for program development} 8/12 0 hours didn't work on the project today 8/13 3.5 hours tested rational.cpp seems to have worked on all cases. .5 hour Moved on to polynomial.cpp. easy module to code .5 hour Tested Polynomial.cpp. Woops got an error, "Arithetic Exception". Tracked it down to divide by 0 in rational.cpp. (note to self: write better test drivers). easy fix though. (gdb is a Good Thing (tm)) 1 hour started writing solver.cpp. Got through constructor, copy constructor, assignment and destructor. 1.5 hours 8/14 0.75 hours Finished coding solver.cpp It compiled by itself,but when compiling the whole project I got: Undefined first referenced symbol in file _6solver.maxpower /var/tmp/cc01S.BA1.o ld: fatal: Symbol referencing errors. No output written to a.out bazooka$ With help from the TA, found out that if you have a static variable you need to actually DECLARE it somewhere in the .cpp file... Other notable syntax error: polynomial.getmaxpower() as opposed to polynomial::getmaxpower(). .75 hour