Long case statements like that always sound an alarm to me. They're a little hard to follow and could easily be a site of frequent change. So, how else can we associate a time with one or more meds?
If the times are strictly on the hour, you might make a 24-slot array and put the meds for 12:00 midnight in slot 0, 1:00 in slot 1, etc. You'd have to convert 800 to 8 for example, but that sounds pretty easy.
Another way to associate things is a Map. Maybe something like:
I suspect you are BRAND new to
Java because of a number of syntax problems in your code, so I suggest you write the smallest possible piece of running code you can manage and work from there. Feel free to post your progress for more help!
BTW: If you don't have a bookmark for the JDK docs, make one now!
http://java.sun.com/j2se/1.4/docs/api/index.html You can look and see how Map works for you. Like, why did I make the time a
String?