The services menu of a beauty institute is organized by categories and subcategories.
-
Category : 'women'
-
SubCategory : 'long hair'
-
Service : 'shampoo and haircut'
A category is defined by :
- an id
- a label
- a list of sub categories
- a list of services
A service is defined by :
- an id
- a label
- a price
The menu of the “flexy-developer-backend” institute is described in a json file (servicesMenu.json). You can find this file in the github project.
Write the java code to :
- Load the services menu into a root category
- Search services with a label that matches a given string (the path of each matched services is required)
- Search services with a price under a given threshold (the path of each matched services is required)
- Unit test the written code
A beauty institute also sells products. So it has a products menu too (in another json file). Suggest an evolution of your code so that it can handle products as well.