Advertisement
|
[x]
Posted via EE Mobile
|
||
Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
||
| 03/03/2008 at 02:56PM PST, ID: 23211155 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: |
//main.cpp
#include <iostream>
#include "Date.h"
#include "Time.h"
#include "DailyAppointmentScheduler.h"
using namespace std;
int main ()
{
person = new char[10];
strcpy(person,"Paul");
Date march2(3,2,2008);
Date march3(3,3,2008);
Date march4(3,4,2008);
Date march5(3,5,2008);
Date march6(3,6,2008);
Date march7(3,7,2008);
Date march8(3,8,2008);
Time su[10];
Time m[10];
Time tu[10];
Time w[10];
Time th[10];
Time f[10];
Time sa[10];
DailyAppointmentScheduler Sunday(march2,su[10]);
DailyAppointmentScheduler Monday(march3,m[10]);
DailyAppointmentScheduler Tuesday(march4,tu[10]);
DailyAppointmentScheduler Wednesday(march5,w[10]);
DailyAppointmentScheduler Thursday(march6,th[10]);
DailyAppointmentScheduler Friday(march7,f[10]);
DailyAppointmentScheduler Saturday(march8,sa[10]);
Sunday.setPurpose("Go to jail.",0);
su[0].setMinutes(30);
su[0].setHours(12);
su[0].setTimeOfDay(true);
Sunday.setPurpose("Get out of jail.",1);
Sunday.setMinutes(45);
su[1].setHours(6);
su[1].setTimeOfDay(true);
Monday.setPurpose("Brush Teeth", 9);
m[9].setMinutes(30);
m[9].setHours(7);
m[9].setTimeOfDay(false);
Monday.setPurpose("Go to sleep",3);
m[3].setMinutes(45);
m[3].setHours(8);
m[3].setTimeOfDay(true);
Tuesday.setPurpose("Go to class.",4);
tu[4].setMinutes(50);
tu[4].setHours(2);
tu[4].setTimeOfDay(true);
Wednesday.setPurpose("Read book.", 6);
w[6].setMinutes(27);
w[6].setHours(5);
w[6].setTimeOfDay(true);
Thursday.setPurpose("Take test.", 7);
th[7].setMinutes(22);
th[7].setHours(9);
th[7].setTimeOfDay(false);
Friday.setPurpose("Go to the club.",0);
f[0].setMinutes(0);
f[0].setHours(7);
f[0].setTimeOfDay(true);
Saturday.setPurpose("Try to start program early.",0);
sa[0].setMinutes(10);
sa[0].setHours(2);
sa[0].setTimeOfDay(true);
}
//Time.h
#include <iostream>
#ifndef TIME_H
#define TIME_H
class Time
{
private:
int minutes;
int hours;
bool timeOfDay;
public:
Time();
Time(int,int,bool);
int getMinutes();
int getHours();
void setMinutes(int);
void setHours(int);
void setTimeOfDay(bool);
bool getTimeOfDay();
};
#endif
Time.cpp
#include "Time.h"
Time::Time()
{
hours = 0;
minutes = 0;
setTimeOfDay = false;
}
Time::Time(int hours1, int minutes, bool timeOfDay1)
{
hours = hours1;
minutes = minutes;
timeOfDay = timeOfDay1;
}
int Time::getMinutes()
{
return minutes;
}
void Time::setMinutes(int newMinutes)
{
minutes = newMinutes;
}
int Time::getHours()
{
return hours;
}
void Time::setHours(int newHours)
{
hours = newHours;
}
bool Time::getTimeOfDay()
{
return timeOfDay;
}
void Time::setTimeOfDay(bool newTimeOfDay)
{
timeOfDay = newTimeOfDay;
}
//date.h
#ifndef DATE_H
#define DATE_H
#include <iostream>
class Date
{
private:
int month;
int day;
int year;
public:
Date();
Date(int,int,int);
int getMonth();
void setMonth(int);
int getDay();
void setDay(int);
int getYear();
void setYear(int);
};
#endif
//Date.cpp
#include "Date.h"
#include <iostream>
Date::Date()
{
day = 0;
month = 0;
year = 0;
}
Date::Date(int day1, int month1, int year1)
{
day = day1;
month = month1;
year = year1;
}
int Date::getMonth()
{
return month;
}
void Date::setMonth(int newMonth)
{
month = newMonth;
}
int Date::getDay()
{
return day;
}
void Date::setDay(int newDay)
{
day = newDay;
}
int Date::getYear()
{
return year;
}
void Date::setYear(int newYear)
{
year = newYear;
}
//DailyAppointmentScheduler.h
#include <iostream>
#include "Date.h"
#include "Time.h"
#ifndef DAILYAPPOINTMENTSCHEDULER_H
#define DAILYAPPOINTMENTSCHEDULER_H
class DailyAppointmentScheduler
{
private:
static char* person;
char* purpose[10];
Date calendarDate;
Time calendarTime[10];
public:
DailyAppointmentScheduler();
DailyAppointmentScheduler(Date,Time);
const char* getPerson() const;
void setPerson(char*);
const char* getPurpose() const;
void setPurpose(char**,int);
~DailyAppointmentScheduler();
DailyAppointmentScheduler &operator=(const DailyAppointmentScheduler&);
friend std::ostream& operator<<(std::ostream &os, const Date &d);
friend std::ostream& operator<<(std::ostream &os, const Time &t);
};
#endif
//DailyAppointmentScheduler.cpp
#include "DailyAppointmentScheduler.h"
#include "Time.h"
#include "Date.h"
#include <iostream>
using namespace std;
char * DailyAppointmentScheduler::person = NULL;
DailyAppointmentScheduler::DailyAppointmentScheduler()
{
}
DailyAppointmentScheduler::DailyAppointmentScheduler(Date,Time)
{
}
const char* DailyAppointmentScheduler::getPerson() const
{
return person;
}
void DailyAppointmentScheduler::setPerson(char* newPerson)
{
delete [] person;
person = new char[strlen(newPerson+1)];
strcpy(person,newPerson);
}
const char* DailyAppointmentScheduler::getPurpose() const
{
return **purpose;
}
void DailyAppointmentScheduler::setPurpose(char** newPurpose, int spot)
{
purpose[spot] = new char[strlen(newPurpose)+1];
strcpy(purpose,newPurpose);
delete [] newPurpose;
}
DailyAppointmentScheduler::~DailyAppointmentScheduler()
{
delete [] purpose;
delete person;
}
DailyAppointmentScheduler& DailyAppointmentScheduler::operator=(const DailyAppointmentScheduler& p)
{
return *this;
}
ostream& operator << (ostream& os, const DailyAppointmentScheduler& s)
{
// os << s.getPerson() << endl;
// os << s.getDay() << " " << s.getMonth() << " " s.getYear() <<endl;
// os << s.getHours() << ":" << s.getMinutes() << " ";
// if(s.getAmOrPm() == false)
// {
// os << "am" << endl;
// }
// else
// {
// os <<"pm" << endl;
// }
// os << s.getPurpose() << endl;
}
|