L&T Technology Services Interview Question

how would you design a state machine framework