Enum Manipulation
Having problems with this class exercise, searching for some help the past few days and throwing myself at the problem to no avail.
1 2 3
|
const int DAYS_IN_WEEK = 7;
enum Weekday {SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY};
|
I need to write a new method called
nextDay(Weekday)
that accepts a value from enum Weekday and returns the value which is the next day.
Would I write the method
nextDay(Weekday)
as a string or an int?
Would I write the method nextDay(Weekday) as a string or an int? |
You would write the function
nextDay as a function. If you're asking what type it should return, that type would be
Weekday.
Topic archived. No new replies allowed.