File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes A nice 'little' problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "A nice Watch "A nice New topic
Author

A nice 'little' problem

matthew weeks
Greenhorn

Joined: Feb 23, 2004
Posts: 15
I'm trying to do a produce a Computerised Room timetabling system for my IT
department at College using Java and JDBC. So far I've managed to add/delete/edit records for information on Rooms, Staff Members and Courses.
I'm now trying to add lessons for courses, here is where my problem lies.
The IT department want the possibility that some rooms within the department to be doubled booked, as a class generally contains about 30
students and some rooms have the capacity of 100 computers. So a room
could easily contain 2/3 classes at the same time. How this can be
acheived using Java? Making sure that staff members and times for lessons
arent also doubled booked aswell, e.g. a lessons time (time it starts and
finish) doesnt overlap with another lesson.
Hope this is clear (its probably not), Any help with this would be most
appreciated.
Loren Rosen
Ranch Hand

Joined: Feb 12, 2003
Posts: 156
This is at least in part a data modelling problem, not a Java problem... but java ranch doesn't have a general database forum...
You say you want to double-book a room, but later you say you have lectures and so forth that you don't want double-booked. Do you mean you've got some rooms which are lecture halls (no double-booking) and some which are labs (double-booking allowed)?
Anyway, the simplest thing that comes to mind is to track, for each room, how many computers it has, and to have each reservation track how many computer it needs.
 
Consider Paul's rocket mass heater.
 
subject: A nice 'little' problem