You are implementing an in-memory task management system (no database required). The system needs basic CRUD features and some ranking/sorting functionality.
A Task can be assigned to multiple people. Model this using a separate Assignment concept.
Design classes (or data structures) such that:
Task
stores only
general metadata
, e.g.
taskId
,
title
,
description
,
createdAt
,
priority
, etc.
assigneeId
startTime
endTime
Explain:
Task
vs
Assignment
, and why.
Specify and implement (at least at the interface level) operations such as:
Clarify:
If this were production code, how would you refactor the solution? Discuss layering (API/service/storage), validation, error handling, testability, and how you’d evolve the design when requirements change.