Titansoft Interview Question

Modify the code base on the new requirements.