Flipkart Interview Experience for Software Engineer-2
First Round(MC Round): Given 90 minutes.
Design a Vehicle Rental Service.
Here’s the question:
Description:
Flipkart is starting a new vehicle rental service FlipCar. In this service, we will rent different kinds of vehicles such as cars and bikes.
Features:
- Rental service has multiple branches throughout the city. Assume one city for now.
- Each branch has a limited number of different kinds of vehicles.
- Each vehicle can be booked with a predefined price. For simplicity, assume fixed pricing.
- Each vehicle can be booked in multiples of 1-hour slots each. (For simplicity, assume slots of a single day)
- No past bookings should be allowed.
Requirements:
- Onboard a new branch with available vehicles
- Onboard new vehicle(s) of an existing type to a particular branch
- Rent a vehicle for a time slot and a vehicle type(the lowest price as the default choice extendable to any other strategy).
- Display available vehicles for a given branch sorted on price
- The vehicle will have to be dropped at the same branch where it was picked up.
- Dynamic pricing – demand vs supply. If 80% of cars in a particular branch are booked, increase the price by 10%.
Bonus question:
Other Details:
- Use the in-memory store.
- Do not create any UI for the application.
- Write a driver class for demo purposes. Which will execute all the commands in one place in the code and test cases.
- Please prioritize code compilation, execution, and completion.
- Work on the expected output first and then add good-to-have features of your own.
Expectations:
- Make sure that you can execute your code and show that it is working.
- Make sure that the code is functionally correct.
- Work on the expected output first and then add good-to-have features of your own.
- Code should be modular and readable.
- Separation of concern should be addressed.
- Code should easily accommodate new requirements with minimal changes.
- Code should be easily testable.
- Input can be taken in your desired format[not necessary to follow the same grammar], but the API’s should remain as is(should contain all the input params)
Please Login to comment...