# much. Coding challenge: Maintenance Company ## Installed base definition Installed Base means all equipment and accessories manufactured or remanufactured by or for particular company, and still in use. An installed base can be a physical product, or a software license. What makes special comparing to normal products is that an installed base is always maintained, and tracked by the manufacturer. also it worth mention that each Installed base is identified by a unique serial number. > e.g: If you buy a two cars from manufacturer `much.` the two cars are considered as `much.`'s installed bases, as long the cars are still under warranty and `much.` is responsible of maintaining them. | Customer name | Model | Serial number | next service date | | ------------- | --------- | ------------- | ----------------- | | Customer 1 | `Model A` | 3-01-53 | 03/09/2021 | | Customer 1 | `Model C` | 1-32-86 | 04/09/2021 | ## The challenge ### Description Your customer today is `much. automotive` that operates in the `automotive` field, basically their cars are being sold all around the world, and their maintenance department is responsible for maintaining their customers' cars as long as they're under warranty. Their service engineer in Munich, Germany. Is named `Carl`, everytime a customer brings his/her vehicle either for periodic maintenance, or to fix a broken part. The service engineer `Carl` will add a new entry in `much. automotive` erp-system, and will mention the software updates that were done. It is worth mentioning that `Carl` will just mention the software parts that were updated. Basically if an service record entry mention that `main_board_sw` = `12.01` and `controller` is `null` that means that he upgraded the `main_board_sw` to a newer version, but the `controller` is still using the software version from old service operations. ### Content description ```python { "serial_number": string, # Installed base serial number "hw_vrs": string, # hardware software version "fpga_vrs": string, # fpga software version "controller": string, # controller software version "ilab_vrs": string, # ilab software version "date": datetime, # Maintenance operation date/time }, ``` #### Task 1 extract the `maintenance data`, and sort the `maintenance data` list based on date. Where the most recent maintenance should show up first and the oldest should show up last. #### Task 2 Using `maintenance data`, log the most recent maintenance operation for each serial number. #### Task 3 Using the data you've got from the API, extract what is the most recent software version for each board (attribute) `hw_vrs/fpga_vrs/controller/ilab_vrs` and log the result on console (displaying the result in form of python dictionary is accepted too). > e.g: the following table displays maintenance operations for installed base with serial #`2-18-99` ordered by date (from oldest to most recent) | serial_number | hw_vrs | fpga_vrs | controller | ilab_vrs | date | | ------------- | ------ | -------- | ---------- | -------- | ---------- | | 2-18-99 | 14.00 | | | 1.2.2 | 10.01.2021 | | 2-18-99 | 14.06 | | 14.121.72 | | 15.01.2021 | | 2-18-99 | | | | | 01.03.2021 | | 2-18-99 | 15.10 | | | 1.2.1 | 22.06.2021 | | 2-18-99 | | 14.34.3 | | | 11.08.2021 | The expected result should be: | serial_number | hw_vrs | fpga_vrs | controller | ilab_vrs | | ------------- | ------ | -------- | ---------- | -------- | | 2-18-99 | 15.10 | 14.34.3 | 14.121.72 | 1.2.1 |