Toll Service
On a daily basis, N types of vehicles that are passing from Y numbers TollPlazas. 1 TollPlaza can have X number of toll booths. Users need to buy the pass to cross the tollBooth.
Below are pass types->
- One way pass
- Round Trip pass
- Daily pass
- Weekly pass
Mandatory
Issue the pass
Validating pass
As a TollBooth owner, I can see below points ->
- Total collection at the day end.
- Total number of vehicles at the day end.
- Number of passes issued to customers.
Scope of this problem ->
- N = 2. We can assume 2 types of vehicle passes from TollPlaza.
- Y = 5. We can assume 5 toll plaza(5 different places).
- X = 3. We can assume 1 toll plaza has 3 tollBooths.
Below are few coding points ->
- We can use any kind of database. Example -> Sql, NoSql, InMemory
- We can use any language.Example -> Java, PHP, Javascript, Python
- We can use any IDE. Example -> IntelliJ, Eclipse, Notepad
Can someone answer this, I was sked this in zeta interview?