Calendar Program that Ouputs Work Schedule

I am currently working on a program for my Object Oriented class. The task is to create a calendar (Which I have already done) and output the work schedule for the entire month. Sounds easy, but it gets tricky.

Total numbers of employees in the group is 4 say A, B, C and D.
A, B and C work morning and evening shifts, however, D works just the evening shifts.

Make calendar for a period of 28days.
Day Schedule:
A – 10Days
B – 10Days
C – 8Days
Evening Schedule:
A ‐ 8nights
B – 8nights
C‐ 6nights
D – 6nights

Rules:
1. C does not work on Tuesdays and Saturdays
2. C does not work on Sunday day schedule but works in night schedule
3. No one should do two consecutive days of Day shift or night shift. However, it is okay for
someone to do one day shift and one night shift in two consecutive days. For example A can
work Monday day shift and Tuesday evening shift.
4. No one can work day shift and night shift on the same day, except on Saturday s.
5. A and B do alternate weekends. If A does Saturday day shift then A also does Saturday night
shift and Sunday day shift. Sunday night shift should be assigned to D.
6. A and D is a pair and B and C is a pair for rule number 5.


Our class asked for this instead of a written final not knowing it would be this difficult. Any Idea where to begin? The calendar is done, I just need help on the rest. I would think the best method is to use classes and backtracking? Idk. HELP PLEASE lol. By the way, its due by Friday May 4th @ 4pm.

Topic archived. No new replies allowed.