Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Modeling a Scheduling System - Help with a good Design

Posted on 2003-03-23
7
Medium Priority
?
163 Views
Last Modified: 2010-03-31
I am attempting to model a system that acts like a course scheduler for a university.
I don't need to worry about particular days (so Date and Calendar don't seem useful).
I need to keep track of what days a course is offered and what time.  The course will
always meet the same times and days of week.  of course I need to keep track of this
and compare so 2 courses aren't meeting the same day and time in the same room.
A few design suggestions would be great I am not looking for code.
0
Comment
Question by:jonasmit
  • 4
  • 3
7 Comments
 
LVL 2

Expert Comment

by:bkrahmer
ID: 8192653
This sounds like a homework problem.  If you want help, you're going to need to put a lot more effort into it.  You should be able to at least draft a couple ideas before asking for help.

brian
0
 
LVL 1

Author Comment

by:jonasmit
ID: 8192976
Weird...it is not homework I am simply trying to learn.  I am just trying to get good ideas on how to model this.  
A starting point if you will.

I could do:
Class Day - that specifies 24hrs in a day where each can be set to occupied (true or false) and then use this in a Class Course.  But this seems inefficient.
And besides not all classes would be 1hr.  And also I want to keep track of it from the standpoint of the Class room also (So to keep it consistent between objects could be a problem).

Any ideas?
0
 
LVL 2

Expert Comment

by:bkrahmer
ID: 8193189
There are quite a few details one would have to know in order to model the system.  What resource(s) do you want to maximize, minimize?  I could see many prioritized features of the program.  The most important thing you can do upfront is find out the requirements for the system.  Once you have all the requirements, you understand what the system is supposed to do, and you've gone through all of the use-cases with the customer, you can design a simple, robust system to accomplish their needs.  

How my system would work would depend on many answers to questions.  Are the rooms a tight resource that has to be efficient?  Do the number of professors need to be taken in mind to teach the classes?  Are there limits to class size?  Etc...

brian
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:jonasmit
ID: 8193252
of course you are right.  I am asking about the scheduling part only.  I want to know a good way to keep track of a period of time and whether it is occupied or not.  So, should I say from 8am to 5pm there are 9hours (0 to 8) and that adds up to 540 minutes (60 x 9) and assuming a granularity of 10 minutes. that would be 54 intervals in a data structure (array i guess).  and just accept a startTime and stopTime calculate the number of intervals necessary and set the data strucuture to indicate that interval is occupied.  I just think somebody has done this before and my thoughts aren't clear on a good way to solve this.  does this help explain what i am asking?
0
 
LVL 2

Expert Comment

by:bkrahmer
ID: 8193321
I ask of you a question: Why would one model time?  Time, by Einstein's theory, is relative.  Let your class object mention it's start and stop time.  I could see, perhaps, having a time or timespan object to represent a time.  However, an array still doesn't seem to fit.  Your last post is still incredibly nebulous.  What are you trying to solve, and what are all if it's attributes?

brian
0
 
LVL 1

Author Comment

by:jonasmit
ID: 8198007
say I have:

public class Course
{
String courseName;
String courseNumber;
int creditHours;
MeetingTimes meetingTimes;

}

public class MeetingTimes
{
int startTime;
int stopTime;
//Days of week?
}

What I am trying to figure out is how to specify the meeting Times in a nice way so I can put it in a database.
if I do this I could only check and see if the database had a course with a certain startTime, stopTime and the other aspects of course.  but I want to compare the timeSpan i guess.  Overlap not exact start and stop times.
0
 
LVL 2

Accepted Solution

by:
bkrahmer earned 100 total points
ID: 8200014
Looks good to me.  I would make daysOfWeek a char, and use bitwise operations to notate whether it met that day or not.  i.e.

SUNDAY = 0x01,
MONDAY = 0x02,
..
SATURDAY = 0x40

Are you on track now?  Does that get you going?

brian
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question