I have just started a programming class and don't really remember some of the previous class and need help I am supposed to create a program that a user will enter the day and it is supposed to return the day in the full format. This is what I have and am not sure where to go from here PLEASE HELP!!!
Code:
//
#include <iostream>
using namespace std;
class DayOfTheWeek
{
public:
void setDay (char);
void getDay (char);
void printDay (char);
private:
char day;
};
DayOfTheWeek::DayOfTheWeek()
{
day = '';
}
void DayOfTheWeek::setDay(char day)
{
cin >> day;
}
void DayOfTheWeek::getDay(char)
{
if (day = Mon);
getDay = "Monday";
else if (day = Tues);
getDay = "Tuesday";
else if (day = Wed);
getDay = "Wednesday";
else if (day = Thu);
getDay = "Thursday";
else if (day = Fri);
getDay = "Friday";
else if (day = Sat);
getDay = "Saturday";
else if (day = Sun);
getDay = "Sunday";
else
getDay = "Error";
}
void DayOfTheWeek::printDay(char)
{
return getDay;
}
int main()
{
DayOfTheWeek day1;
DayOfTheWeek day2;
day1.setDay(char);
day2.setDay(char);
day1.getDay(char);
day2.getDay(char);
cout << day1.printday(char) << endl;
cout << day2.printday(char) << endl;
return 0;
}