Looking for comments on the design of my object-oriented class diagram

I can not find anywhere else where I can show an OO system design and get feedback on it.

Could you identify major problems with my design and how to solve them?


The description of the problem is as follows:

  1. Create a class diagram of a restaurant system. There are employees and they can play multiple roles, depending on demand. Example: An employee can be a cook at a time and a waiter at another time.
  2. The owner of the store must be able to access the system and say: that day, I need 3 cooks, 5 servers, 2 managers, etc. from 17h to 20h, then from 20h to 22h. I need 2 cooks, 2 waiters and soon. The user has not specified which employee will be present, only the roles and quantities for the time.
  3. There is an external system that can, after receiving a set of requests, determine which employees will respond to these requests. How to call this system (what needs to be conveyed to it and what needs to be recovered) must be part of the design.

Here is the class diagram that I have built to meet the requirements:

enter the description of the image here


What can be achieved from this design is:

  • A Employee have a lot Roles (requirement 1)
  • the Controller The class is the one triggered by the user. On the basis of the entry (that day, these roles and these quantities are needed), he creates a list of Requests, each Request indicates that N number of Roles required between start date and end date (requirement 2)
  • the Controller calls the external API (Planner) passing requests and the list of employees, and the API returns a Program object which is a composition of several ScheduleEntry. A ScheduleEntry binds a Employee has a Role for a given start and end date (requirement 3). Here, it could be a facade to an external system, but it is represented as a class for simplicity.