calendar reader-like thing for school

re_animate

New member
Joined
Mar 19, 2007
Messages
2
Programming Experience
Beginner
Hi guys,

At my school we have this system.

Option A, B, C, D, E, F, G

A = Electronics
B = Graphics
C = Science....etc

they cycle the options in a pattern

Day 1 abcdef
Day 2 bdface
Day 3 cfbead
Day 4 daebfc
Day 5 ecafdb
Day 6 fedcba

period 1 finishes at 9.25am period 2 etc

We only go to school 5 days but there are 6 days on the options chart so if the options starts at Day 1 on Monday its will start on Day 6 on the following Monday.

I want to make a program that tells me what option i have when i press a button.

For now I'm just trying to write an engine for this (I'm still fairly new to the programming scene) and eventual use the algorithm and system to develop a program for my psp so everytime i ask for my option it tells me :D

at this point i just want to know the method i have to use IE

i know i have to sync it with the time and date (period 1 finishes at 9.25am period 2 etc) but how and what steps does the program have to go through to find my option?
 
Normally you would set a start date with a known option set and then make an algorithm to produce the options for a given day. But! I think this will get really messy to do because of exceptions to the schedule; holidays, snow days, number of days in a month, etc. Plus, the school may not absolutely follow an exact pattern.

Figuring roughly 9 months of school at 5 days a week makes 180 school days. I think I would build a data table with a date and a schedule in each row. Then have your program look up the current date in this table. Then it would check the current time and look up the option for that moment from the schedule.

Hand entering the data table is a pain, but without seeing the actual schedule the school put out and checking it for consistency, I think a data table is a better solution.

Bernie
 
Back
Top