#include #include #include #include using namespace std; class weather { public: int tempHi; int tempLo; string day; string weather; int todays_date = 0; void print() const; void nextDay(); void change(); }; string weekday[] { "Tuesday" , "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" , "Monday" }; int weeksize {size(weekday)}; //string *w {&weekday[]}; int temp_High[] { 74 , 84, 90 , 85 , 75 , 79 , 74, 74 }; int temp_Low[] { 61 , 67 , 72 , 68 , 65 , 63 , 63 , 65 }; string forecast[] { "Sunny" , "Sunny", "Partly Cloudy", "Partly Cloudy", "Showers", "Partly Cloudy", "Partly Cloudy", "Mostly Cloudy" }; int tempsizeH {size(temp_High)}; //int *t {&temp_High[]}; int main() { weather today; int todays_date= 0; today.day = weekday[todays_date]; today.tempHi = temp_High[todays_date]; today.weather = forecast[todays_date]; today.tempLo = temp_Low[todays_date]; today.print(); //weather tomorrow{today}; today.change(); return EXIT_SUCCESS; }; void weather::print() const { cout << day << ": High of " << tempHi << "F " <<"\n" << " Low of " << tempLo << "F" << " Forecast of " << weather << endl; } void weather::nextDay() { ++todays_date; if (todays_date >= weeksize) { todays_date = 0; } day = weekday[todays_date]; tempHi = temp_High[todays_date]; weather = forecast[todays_date]; tempLo = temp_Low[todays_date]; } void weather::change() { string start_day = day; do { nextDay(); print(); } while (day != start_day); }