Cisco Interview Question

Two logic design questions. Implementation of a module that does some task.