I think this is what he meant:
calls between 6:00am and 6:00pm on weekdays are $2.50/min
other calls on weekdays are $2.00/min
calls on weekends are $1.50/min
the program needs to ask for the day, the start time of the call, and the end tome of the call, and compute how much the call should be charged.
Personally, I wouldn't use integers to represent which day of the week it is. It's not the most user friendly method, and can get quite confusing to program with, especially on team projects.
Here's what I'd do for representing the day:
public static enum DayOfWeek {
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY;
@Override
public String toString()
{
if (this == MONDAY)
{
return "Monday";
}
else if (this == TUESDAY)
{
return "Tuesday";
}
else if (this == WEDNESDAY)
{
return "Wednesday";
}
else if (this == THURSDAY)
{
return "Thursday";
}
else if (this == FRIDAY)
{
return "Friday";
}
else if (this == SATURDAY)
{
return "Saturday";
}
else
{
return "Sunday";
}
}
public boolean isWeekend()
{
if (this != SATURDAY && this != SUNDAY)
{
return false;
}
else
{
return true;
}
}
}