Java Reference
In-Depth Information
3
Scheduler
Synthesis
This chapter addresses the problem of building a tool for activities sched-
uling. The scheduling tool offers essential functionalities, such as creating
activities and tasks, assigning resources to activities, devising a time plan
that enforces temporal and resource constraints, and displaying the results
in a graphical interface.
Focus: this case study emphasizes the role of domain models and the
mapping between entities of the problem and objects of the solution.
OO techniques: inclusion and separation of concerns.
Java features: Collections, AWT and Swing components.
Background: the reader is required to know the basic OO concepts and
fundamental Java programming techniques.
3.1
Specifications
To illustrate the capabilities of the collaborative scheduling tool, we consider
two scenarios that depict how the tool can be used to solve different sched-
uling problems. In both scenarios, the concepts of project, project manager
and team members are used in a broad sense. Roughly speaking, a project is
a coherent set of tasks related to one another by the use of common
resources in a given time frame corresponding to the duration of the project.
The first scenario is about mail delivery in a city, where the distribution
clerk of the central post office plays the role of project manager. He or she
sorts mail and delegates its distribution to the carriers. The second scenario
is about a fitness club where the trainer schedules workouts for the athletes.
In both scenarios, the project manager has the responsibility to elaborate
a time plan and the team members to revise it while carrying out their
activities.
3.1.1
Mail delivery service
The post office employs a number of carriers for daily mail delivery. The city
is partitioned into delivery areas and every area is assigned to only one
carrier. Each carrier is in charge of delivering mail within the assigned area
following a predefined set of delivery routes. Each route starts and ends at
 
Search WWH ::




Custom Search