Reply

Join Date: Oct 2007
Posts: 8
Reputation: qulit is an unknown quantity at this point 
Solved Threads: 0
qulit qulit is offline Offline
Newbie Poster

time

 
0
  #1
Oct 18th, 2007
Hello to all. I have a project which is scheduling system using vb6. I can't or don't know how to find the time conflicts of each subject at the given day and given professor. For example user select the section name then a combo box for selection of subject then the a 5 checkbox(array) will unlocked then the user will select from monday - friday checkbox(array) then the combo box for the selection of start time will unlocked then another combo box for the selection of end time will unlocked and the last one is the combo box for the selection of the professor. I hope you can help me. thank you in advance.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 30
Reputation: yello is an unknown quantity at this point 
Solved Threads: 4
yello yello is offline Offline
Light Poster

Re: time

 
0
  #2
Oct 18th, 2007
Exactly what do you want to know?

You want help on how to do something in vbcode? or you want somebody to implement all your business logic in vbcode?
www.easyprograming.com
Make Your Programing Easy
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 8
Reputation: qulit is an unknown quantity at this point 
Solved Threads: 0
qulit qulit is offline Offline
Newbie Poster

Re: time

 
0
  #3
Oct 19th, 2007
Originally Posted by yello View Post
Exactly what do you want to know?

You want help on how to do something in vbcode? or you want somebody to implement all your business logic in vbcode?

I want some tips or maybe some codes to be able to make the detect the conflicts of each subjects in one section. I don't know the this function or the logic of this.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 8
Reputation: qulit is an unknown quantity at this point 
Solved Threads: 0
qulit qulit is offline Offline
Newbie Poster

Re: time

 
0
  #4
Oct 19th, 2007
I already done the part of combo box where the user can select subject and professor. The only problem i had is the check box(array) of the day and the combo boxes for the time start and time end which is definitely the available time start and time end will show or can be selected.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 147
Reputation: hopalongcassidy is an unknown quantity at this point 
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: time

 
0
  #5
Oct 19th, 2007
You are focusing on the user interface. Have you given any thought to the database? You need a table that describes each time period each professor is teaching a subject and what section that class is in. To find out if a given subject is being taught at a given time, you need something like:

SELECT * from classes WHERE (myStartTime BETWEEN classes.StartTime AND classes.EndTime) AND (myEndTime BETWEEN classes.StartTime AND classes.EndTime)

Hoppy
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 8
Reputation: qulit is an unknown quantity at this point 
Solved Threads: 0
qulit qulit is offline Offline
Newbie Poster

Re: time

 
0
  #6
Oct 20th, 2007
Originally Posted by hopalongcassidy View Post
You are focusing on the user interface. Have you given any thought to the database? You need a table that describes each time period each professor is teaching a subject and what section that class is in. To find out if a given subject is being taught at a given time, you need something like:

SELECT * from classes WHERE (myStartTime BETWEEN classes.StartTime AND classes.EndTime) AND (myEndTime BETWEEN classes.StartTime AND classes.EndTime)

Hoppy
I have a screen shot of my program and the codes of the screen shot. pls help me to solve my problem.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 8
Reputation: qulit is an unknown quantity at this point 
Solved Threads: 0
qulit qulit is offline Offline
Newbie Poster

Re: time

 
0
  #7
Oct 20th, 2007
this the screen shot and the code i use in this form
Attached Images
File Type: bmp system.bmp (292.6 KB, 4 views)
Attached Files
File Type: txt code.txt (3.7 KB, 3 views)
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 147
Reputation: hopalongcassidy is an unknown quantity at this point 
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: time

 
0
  #8
Oct 20th, 2007
I looked at your screen shot and I looked at your code. I also looked at the answer you gave to Yello's question.

From my look at the screen shot, it seems to me that you have not really thought the problem through. Your answer to Yello's question seems to indicate that you want to populate the "Time start", "Time end" and "Professor" comboboxes based on the chosen "Subject" and "Time Day". The problem with this is that the start times, end times and professors are not independent of each other. The combo boxes you have set up to enable a user to select each of these independently. So, for example the user could easily select the start time from one class, the end time for some other class and the professor teaching a third class. I don't think that this will work the way you want it to. I would suggest a single combo box with three columns that lists the actual valid combinations of professor, start time and end time for a given subject and day of the week. Also, when I was going to school, a typical class might be taught by a given professor for an hour on Monday, an hour on Wednesday and an hour on Friday. Is this the case in your school?

I think that you need to think a little bit more about what the possibilities are and how to design your application in such a way that it is impossible for the user to enter invalid data. You should not write a single line of code until your design is absolutely air-tight! Once you have a good design, you will be surprised at how much simpler your code will be.

Hoppy
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 8
Reputation: qulit is an unknown quantity at this point 
Solved Threads: 0
qulit qulit is offline Offline
Newbie Poster

Re: time

 
0
  #9
Oct 20th, 2007
Originally Posted by hopalongcassidy View Post
I looked at your screen shot and I looked at your code. I also looked at the answer you gave to Yello's question.

From my look at the screen shot, it seems to me that you have not really thought the problem through. Your answer to Yello's question seems to indicate that you want to populate the "Time start", "Time end" and "Professor" comboboxes based on the chosen "Subject" and "Time Day". The problem with this is that the start times, end times and professors are not independent of each other. The combo boxes you have set up to enable a user to select each of these independently. So, for example the user could easily select the start time from one class, the end time for some other class and the professor teaching a third class. I don't think that this will work the way you want it to. I would suggest a single combo box with three columns that lists the actual valid combinations of professor, start time and end time for a given subject and day of the week. Also, when I was going to school, a typical class might be taught by a given professor for an hour on Monday, an hour on Wednesday and an hour on Friday. Is this the case in your school?

I think that you need to think a little bit more about what the possibilities are and how to design your application in such a way that it is impossible for the user to enter invalid data. You should not write a single line of code until your design is absolutely air-tight! Once you have a good design, you will be surprised at how much simpler your code will be.

Hoppy


Maybe your right. But your suggesting me of thing that i don't understand yet and i don't have enough time to study and go back to design. How bout i populate all the time(from 7:00 am - 5:00 pm) then when user update the system will prompt if the given day and time has a conflict.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 147
Reputation: hopalongcassidy is an unknown quantity at this point 
Solved Threads: 13
hopalongcassidy's Avatar
hopalongcassidy hopalongcassidy is offline Offline
Junior Poster

Re: time

 
0
  #10
Oct 20th, 2007
Originally Posted by qulit View Post
Maybe your right. But your suggesting me of thing that i don't understand yet and i don't have enough time to study and go back to design. How bout i populate all the time(from 7:00 am - 5:00 pm) then when user update the system will prompt if the given day and time has a conflict.
Coming up with a good design doesn't take as much time as you imagine. And it's the most important skill you can have as a programmer. And it's much more important than "coming up with something" on this particular assignment in this particular class. Better to fail on an assignment than to fail in your career. You can ask anyone who has achieved success at anything and they will (without exception) tell you that what I'm saying is true. In your heart, you already know it's true.

You need to look at each element of the data you want the user to input and ask yourself, "What am I expecting the user to input?" and "What other things might the user input that will create problems?" and then "How can I change my design to eliminate the problems?".

Then, when you go to write the code, you will find that there are a lot of conditions that you don't have to write code to check for because you will have designed the possibility of those conditions out of the software. Your code will be simpler, easier to write and debug and easier for someone else to read.

Hoppy
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC