Swiggy interview question

Machine Coding round: Write a scalable, extensible code for the given scenario.