Basic dish per restaurant type validation

Hello. The specification states that we have to validate that there exists at least one basic dish per restaurant type for which there exists a restaurant.

We were wondering if this counts as valid:
rec1: basic for EUROPEAN
rec2: not basic for any
restaurant: EUROPEAN, [rec2]

Because there exists a basic recipe for European but it is not assigned to any european restaurant

1 Like

Hi,
Yes, this is valid.

  • Page 29, lines 25–26 requires that a basic dish exists for every used restaurant type.
  • Page 19, lines 8–10 states that all restaurants of the same type offer the same basic dishes.

Therefore, rec1 is automatically offered by the EUROPEAN restaurant even if only rec2 is listed explicitly.

4 Likes

so that means that in the json file the list of recipeIds within the restaurantobject can be empty, because the restaurant anyways offers the basicdishes for it’s type?

Per restaurant there must exist at least one recipe, waiter, table and cook.
There must exist at least one basic dish per restaurant type for which there exists a restaurant.

and wouldn’t therefore for the first point the recipe existance be redundant?

No, recipes cannot be empty. Page 29, line 24 explicitly requires at least one recipe per restaurant.

2 Likes

Correction to My Previous Answer

The recipes list may be empty. A restaurant automatically offers the basic dishes of its type, so their default recipes satisfy the requirement that every restaurant has at least one recipe.

6 Likes