appendix A. Solutions to the exercises
This appendix contains the solutions to the exercises in the book. I encourage you to solve them before reading their solutions, which include detailed explanations, references to relevant sections, and additional comments.
Chapter 2
Solution to exercise 2.1
As seen in section 2.3.1, users can be end users, applications, or their developers. Potential users of an API for an HR tool that manages time-off requests can be
- Employees (who request time off)
- Managers (who approve or deny requests)
- HR administrators (who manage time-off policies and oversee usage)
- Time-off application and its developers (used by employees, managers, and HR administrators)
- Payroll staff (who need time off data for accurate salary calculations)
- Payroll system and its developers (who need to integrate the time-off data)
As seen in section 2.3.1, you should probably prioritize analyzing employees’ use cases. Employees are directly involved in creating time-off requests, the core functionality from which everything else flows (approval, policies, payroll integration). As seen in section 2.3.2, analyzing the “Requesting time off” use case is a good start, because it is the functionality that employees use the most. Additionally, it’s why we chose to focus on employees. However, as seen in section 2.4.3, if you prioritize analyzing employees’ needs, remember not to neglect other users. For example, time off won’t be validated without the manager’s use cases being fulfilled.