?
Solved

Modeling a Scheduling System - Help with a good Design

Posted on 2003-03-23
7
Medium Priority
?
161 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

801 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