Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

String Arrays, I/O, and Calendar Usage

 
Greenhorn
Posts: 4
Eclipse IDE Windows Vista Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi everyone. I'm trying to write a program that creates an employee "on call" list for hourly workers. There are four crews: each works 4 12 hour shifts in a row, then gets four days off, rotating between working days and nights. While not working, three employees are on call each day and another three each night, rotating through the two crews who are not working. My goal is to generate a list of the employees who are on call for each shift that looks like this:

2012-04-08
----------
Tim
David
Walter

2012-04-09
----------
David
Walter
Lewis


I am storing crew names in text files, then reading them into String arrays using BufferedReader. I wrote an array to cycle the next employee to the top of the list for each shift, I am using Joda Time to cycle through each date, and I have formatted the output to print out as shown above. Basically, my problem is finding a way to calculate which crews are on call and which are working for a given shift/week/month. Does anyone have a suggestion for calculating this?

 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
    Bookmark Topic Watch Topic
  • New Topic