An api to calculate the total fare for a list of metro journeys provided. The calculation considers the followig:
- Source and destination zone of the journey
- Peak timings
- Daily cap of fare
- Weekly cap of fare
Please note the following assumptions:
- The calculator engine is an api and it can be used by a web application or desktop application to do the necessary calculations.
- No external database or storage mechanism is used. Instead an option to store the records in memory has been used.
- No authorisation or authentication mechanism is built.
- Test cases have been written only for the main controller (api) method.
- There are 3 projects - a. Main api project b. A project for the contract used to pass information to the api c. Tests project