CJCoding With Joseph
15free / daySign inCreate account

You are storing a simple weekly schedule.

Create a class WeekSchedule that stores 7 strings (one for each day).

Requirements: 1) Constructor WeekSchedule(const string days[7]) that copies the 7 values 2) Overload operator[] to return the string at an index (0 to 6)

Return type should be string (by value) for simplicity. Do NOT write a main function.

Expected output

Gym
Rest

= newline. The output ends with a newline, so print one after the last line.

Hints2 available
Topics
ClassesOperator Overloading
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.