Rave Radio: Offline (0/0)
Email: Password:
Page: 1Rating: Unrated [0]
Ian Has No Class!
Good [+1]Toggle ReplyLink» michaeldino replied on Thu Mar 3, 2005 @ 7:39pm
michaeldino
Coolness: 69660
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
nothingnopenope
Coolness: 201910
I wish I could make more than one choice because this is both stupid and gay
Good [+1]Toggle ReplyLink» daFTWin replied on Thu Mar 3, 2005 @ 7:48pm
daftwin
Coolness: 277120
but gay is stupid so theres your answer!
Good [+1]Toggle ReplyLink» neoform replied on Thu Mar 3, 2005 @ 7:59pm
neoform
Coolness: 340350
if you wrote that, i'm impressed.
Good [+1]Toggle ReplyLink» michaeldino replied on Thu Mar 3, 2005 @ 8:08pm
michaeldino
Coolness: 69660
i did write that!!
im so proud!
Good [+1]Toggle ReplyLink» neoform replied on Thu Mar 3, 2005 @ 8:11pm
neoform
Coolness: 340350
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
screwhead
Coolness: 686275
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
neoform
Coolness: 340350
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
screwhead
Coolness: 686275
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
neoform
Coolness: 340350
uhh.. cause i need a punching bag? duh.
Good [+1]Toggle ReplyLink» basdini replied on Fri Mar 4, 2005 @ 12:17am
basdini
Coolness: 145885
gay wins by a land slide
Good [+1]Toggle ReplyLink» Screwhead replied on Fri Mar 4, 2005 @ 1:11am
screwhead
Coolness: 686275
I
Good [+1]Toggle ReplyLink» neoform replied on Fri Mar 4, 2005 @ 7:17am
neoform
Coolness: 340350
wins by 3 votes is landslide?
Good [+1]Toggle ReplyLink» Zz.ee.vV replied on Fri Mar 4, 2005 @ 8:32am
zz.ee.vv
Coolness: 194710
heh... well somebody's proud of their OOP assignment :b
Good [+1]Toggle ReplyLink» neoform replied on Fri Mar 4, 2005 @ 9:05am
neoform
Coolness: 340350
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
suckballs_bebe
Coolness: 67170
I vote for dangerously cheesy!
Good [+1]Toggle ReplyLink» cactain_steef replied on Fri Mar 4, 2005 @ 10:46am
cactain_steef
Coolness: 155360
.....

Gay.
Good [+1]Toggle ReplyLink» blop replied on Fri Mar 4, 2005 @ 12:16pm
blop
Coolness: 201215
Ian Has No Class!
Page: 1
Post A Reply
You must be logged in to post a reply.