CPEN 221A · 2025 lab archive

Lab 5: ADTs and the JobManager

2025 archive

Jump to a lab section

Overview

This lab activity focuses on the design and implementation of an abstract data type (ADT) that we shall call JobManager. A JobManager is responsible to managing a set of jobs, which are identified by integer IDs from 1 to n. A JobManager also maintains a set of Robot objects that are responsible for completing these jobs. The JobManager ADT's operations enable its user to manage the set of Robots and the assignment of jobs to thoseRobots.


Operations

A JobManager is seeded with n (the number of jobs it is managing). Each of these n jobs are initially “unassigned” (i.e., not assigned to a robot). One can then add Robots, assign jobs to the Robots, and move jobs among the Robots.

The principal operations that the JobManager ADT supports are as follows:


Your Task

Your task is to implement the JobManager ADT in Java by implementing all methods corresponding to the Operations outlined above according to their respective specs detailed in the JobManager class file. You cannot change the spec of any methods, and you cannot change the Robot class in any way.


Grading

You will answer some questions on PrairieLearn and you will submit your implementation to PrairieLearn and GitHub.

For the implementation aspect of this assignment, we will grade your GitHub submission, with more tests than are used on PrairieLearn. But the tests on PrairieLearn should offer some guidance. (And do not worry about the points on PrairieLearn for the programming question; they do not matter.)

This programming task is worth 6 points and the other questions on PrairieLearn are worth 3 points.