#C14722. Simple Task Management System
Simple Task Management System
Simple Task Management System
In this problem, you are required to implement a simple task management system that supports operations such as creating, editing, deleting, and marking tasks as complete. Each task has a title, description, due date, and priority. The due date is given in the format (YYYY-MM-DD) and the priority is an integer. You will be given a series of commands via standard input; you must process them sequentially and then output the final list of tasks. Each task is printed on its own line with its details and a status which is either Complete or Incomplete.
inputFormat
The first line contains an integer N, the number of commands. Each of the next N lines contains a command from the following four types:
- CREATE title description due_date priority
- EDIT index title description due_date priority
- DELETE index
- COMPLETE index
Fields:
- title: a string representing the task title (no spaces).
- description: a string representing the task description (no spaces).
- due_date: the due date in the format (YYYY-MM-DD).
- priority: an integer representing the task priority.
- index: a 0-based index referring to the task in the current list. It is guaranteed that all operations are valid. Input is provided via standard input.
outputFormat
After processing all commands, output each remaining task on a separate line in the order they are stored. For each task, print the following fields separated by a single space: title, description, due_date, priority, and status. The status should be 'Complete' if the task has been marked complete, and 'Incomplete' otherwise. Output the result via standard output.## sample
4
CREATE Task1 Desc1 2023-11-01 1
CREATE Task2 Desc2 2023-12-01 2
COMPLETE 0
DELETE 1
Task1 Desc1 2023-11-01 1 Complete