What are some recommended ways to model the following in a class diagram?

There is a class of Machine, and the Machine may be assigned to a work group (Class Work Group), or assigned to a free pool, or a maintenance pool (if machine needs repair).

A machine can only be assigned to one of the following: a particular work group, the free pool or the maintenance pool.

option 1:

Class Machine has three associations (multiplicity of 1) that point to the three different classes (Work Group, Free Pool, Maintenance Pool) with a multiplicity of 0..1

A constraint text box is used to point to each association to say that for each instance of machine, only one association can be non-zero at any given time.

this seems to work but is messy

option 2:

Create a qualified association from each pool/workgroup Class that points to the Machine Class with a multiplicity of 0..*. The qualifer for each one might be Assign=Free, Assign=Maintenance, or Assign=<workgroup-id>.

My understanding is that a qualifed association should result in mapping to zero to one instance (i.e. multiplicity is 0..1). In this case, any pool or work group needs to be able to map to 0 to many instances (of the Class Machine).

option 3:

create a class called inventory that associates to all the machines (0..*) and has an Locater interface class associated with it that has operations such as findbyID(), findbyAssignmentType().


Which of these options are reasonable? Is there a better option?