QUOTE(Topher84 @ 15 Mar, 2008 - 08:04 PM)

when you hit reply.. there is text in the background of the reply box that tells you how to post your code.. just look in the background where you type
Write a program that contains a class that implements the days of the week. The program should be able to perform the following on an object of a class.
1. Set the day
2. Print the day to the computer monitor(not the printer)
3. Return the day
Create a new class called DayOfTheWeek. The class should have a data member that can store the day of the week such as Mon for Monday, Tues for Tuesday etc...
Create the necessary member functions that will perform the required operations outlined in the lab summary above.
Call these functions setDay, printDay and getDay.
Write a main program that will instantiate two objects of the class DayOfTheWeek. Use these objects to test the various operations on this class.
DayOfTheWeekHEA~1
#include <string>
using std::string;
class DayOfTheWeek
{
private:
string day
string hour
public:
void setday(string, string);
void printday();
string getday();
};
DayOfTheWeekIMP
#include <iostream>
#include <string>
#include "DayOfTheWeek.h"
using namespace std;
void DayOfTheWeek::setdayinfo(string day, string hour)
{
Monday = mon;
Tuesday = tues;
Wednesday = weds;
Thursday = thurs;
Friday = fri;
Saturday = sat;
Sunday = sun;
}
void DayOfTheWeek::printDay()
{
cout << "Day: " << day << endl;
cout << "Hour: " << hour << endl;
}
string DayOfTheWeek::getday()
{
return day;
}
I'm I missing anything within this code?