There are a lot of factors that you need to consider (or if your
assignment is as flaky as most of the ooa&d classes we used to have
forced upon us, make up and state your own constraints, then defend
them). I would probably start by looking at the largest and smallest
discrete time segments. Those are probably going to make good
classes. Do visits ever stretch between months? Probably not, so a
month might be a good container class (espescially since it is
mentioned in your assignment and it is convenient for fiscal etc
analysis). On the other end of the time spectrum... do doctors always
allocate the same amount of time for each visit? Are there
constraints, such as limited waiting areas or observation rooms or
whatever? Do we have to consider medical histories or lab usage when
scheduling patients? These concerns are also going to shape your
modelling. Assuming the office keeps regular hours and your only
constraint is time, then you are probably going to want month, day,
and scheduled_visit objects for each doctor with doctor as either an
enumerated type or a part of a global wrapper class.
hope this got your juices flowing.
"SB" <vo******@hotmail.com> wrote in message news:<u0d_b.14387$Dc2.7710@lakeread01>...
Can anyone provide any insight/advice on how to take a problem (academic
assignment) and figure out what the classes should be? I have an assignment
that is basically a doctors scheduling program, i.e. for three doctors show
their schedule for the month of surgies, lectures and free time. It also
lets patients schedule appointments in the free time slots.
My problem is not being able to determine what the classes and how many of
them there should be. I know this is open ended, as each programmer might
see it differently and have different classes and not the same number of
classes as the next programmer. I would just like to know if there are any
guidelines to follow for breaking a problem down into classes.
Thanks in advance!