Search code examples
oopumldiagramclass-diagram

Which connection should the seat class use with which classes in this Uml diagram?


I have 4 class in my diagram. These are appointment, dentist, patient and seat classes.

In any clinic, dentists use the seats right?. My question begins here.

This is part of my diagram. UML Diagram

the dentist is using the chairs while doing the examination, which type of oop connection should I use when the link seat and dentist classes or should I link dentist and seat classes?

should connection be association, aggregation or something like that? Which connection should I use?


Solution

  • Warning you put an unexpected S at the end of Seat, this is very probably not what you wanted.

    By seat you probably mean all the resources used by a dentist to operate/examine a patient.

    If a dentist always use the same seat and associated instruments and is the alone to use them the association can be between the dentist and the seat, and that link can be an association, but not an aggregation because the dentist is not composed by a seat nor the reverse.

    If the seat and associated instruments is not always the same for a given dentist we can link it with the appointment, again through an association, allowing to reserve it for the operation/examination done by the dentist to the patient