Page: 1 | Rating: Unrated [0] |
Ian Has No Class!
Good [+1]Toggle ReplyLink» michaeldino replied on Thu Mar 3, 2005 @ 7:39pm |
BUT THIS PROGRAM DOES!!!!
// prevent multiple inclusions of header file #ifndef TIME1_H #define TIME1_H class Time { public: Time( int = 0, int = 0, int = 0 ); // default constructor // set functions void setTime( int, int, int ); // set hour, minute, second void setHour( int ); // set hour void setMinute( int ); // set minute void setSecond( int ); // set second // get functions int getHour(); // return hour int getMinute(); // return minute int getSecond(); // return second void printUniversal(); // output universal-time format void printStandard(); // output standard-time format void Tick( Time &tt, int ); private: int hour; // 0 - 23 (24-hour clock format) int minute; // 0 - 59 int second; // 0 - 59 }; // end clas Time #endif // Member-function definitions for Time class. #include using std::cout; #include using std::setfill; using std::setw; // include definition of class Time from time1.h #include \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"time1.h\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" // constructor function to initialize private data; // calls member function setTime to set variables; // default values are 0 (see class definition) Time::Time( int hr, int min, int sec ) { setTime( hr, min, sec ); } // end Time constructor // set hour, minute and second values void Time::setTime( int h, int m, int s ) { setHour( h ); setMinute( m ); setSecond( s ); } // end function setTime // set hour value void Time::setHour( int h ) { hour = ( h >= 0 && h < 24 ) ? h : 0; } // end function setHour // set minute value void Time::setMinute( int m ) { minute = ( m >= 0 && m < 60 ) ? m : 0; } // end function setMinute // set second value void Time::setSecond( int s ) { second = ( s >= 0 && s < 60 ) ? s : 0; } // end function setSecond // return hour value int Time::getHour() { return hour; } // end function getHour // return minute value int Time::getMinute() { return minute; } // end function getMinute // return second value int Time::getSecond() { return second; } // end function getSecond // print Time in universal format void Time::printUniversal() { cout |
Good [+1]Toggle ReplyLink» nothingnopenope replied on Thu Mar 3, 2005 @ 7:40pm |
Good [+1]Toggle ReplyLink» daFTWin replied on Thu Mar 3, 2005 @ 7:48pm |
Good [+1]Toggle ReplyLink» neoform replied on Thu Mar 3, 2005 @ 7:59pm |
Good [+1]Toggle ReplyLink» michaeldino replied on Thu Mar 3, 2005 @ 8:08pm |
Good [+1]Toggle ReplyLink» neoform replied on Thu Mar 3, 2005 @ 8:11pm |
but..
no memory handling. i'm VERY dissapointed. AS dissapointed as if you hadn't writen anything at all. |
Good [+1]Toggle ReplyLink» Screwhead replied on Thu Mar 3, 2005 @ 10:36pm |
If he hadn't written anything at all, then there would have been nothing to be dissapointed about! |
Good [+1]Toggle ReplyLink» neoform replied on Thu Mar 3, 2005 @ 11:15pm |
yes i would be, he had this as an assignment.. so if he didn't do it.. he'd get a bad mark and i'd be dissapointed. |
Good [+1]Toggle ReplyLink» Screwhead replied on Thu Mar 3, 2005 @ 11:22pm |
And why would you be dissapointed in his faliure? Are you trying to live your life vicariously through him, and the slightest of faliures would remind you of how flawed and imperfect his life is, just as yours is? |
Good [+1]Toggle ReplyLink» neoform replied on Thu Mar 3, 2005 @ 11:46pm |
Good [+1]Toggle ReplyLink» basdini replied on Fri Mar 4, 2005 @ 12:17am |
Good [+1]Toggle ReplyLink» Screwhead replied on Fri Mar 4, 2005 @ 1:11am |
Good [+1]Toggle ReplyLink» neoform replied on Fri Mar 4, 2005 @ 7:17am |
Good [+1]Toggle ReplyLink» Zz.ee.vV replied on Fri Mar 4, 2005 @ 8:32am |
Good [+1]Toggle ReplyLink» neoform replied on Fri Mar 4, 2005 @ 9:05am |
i can't tell since it was posted on RW.. but that had BETTER be properly indented.. i can't stand code that hasn't been indented properly.. (yet everyone in my class at school doesn't indent, it drives me nuts). |
Good [+1]Toggle ReplyLink» Suckballs_bebe replied on Fri Mar 4, 2005 @ 9:07am |
Good [+1]Toggle ReplyLink» cactain_steef replied on Fri Mar 4, 2005 @ 10:46am |
Good [+1]Toggle ReplyLink» blop replied on Fri Mar 4, 2005 @ 12:16pm |
Ian Has No Class!
Page: 1 |
[ Top Of Page ] |
Post A Reply |
You must be logged in to post a reply.
[ Top Of Page ] |