Assignment 1 Task management system
October 27, 2024
0.0.1 Task Management System Assignment
This assignment involves creating a simple task management system using Python, consisting of
three main parts: task.py, task_manager.py, and interface.py. You’ll implement various fea-
tures to manage personal and work tasks, with specific requirements for each file. Documentation
and an oral defense will be evaluated as part of your final score.
0.0.2 Scoring Breakdown
• task.py (3 points)
• task_manager.py (3 points)
• interface.py (1 point)
• Documentation (3 points)
• Oral Defense (10 points)
0.0.3 Instructions for Each Component
1. task.py (3 points) Create a class-based structure to manage task data, including the follow-
ing classes:
• Task Class
– Attributes: _task_id (auto-incremented unique identifier), title, due_date, status
(default: “pending”), _description (protected, initially None), flag (to differentiate
between task types).
– Methods:
∗ mark_completed(): Changes the task’s status to “completed”.
∗ __str__(): Returns a formatted string for easy printing of task details.
∗ getter and setter methods for protected variables (_task_id, _description). Use
the setter for _description to raise a ValueError if the description exceeds 15
characters.
–
• PersonalTask Class (inherits from Task)
– Attributes: Adds a priority attribute (default “low”).
– Methods:
∗ is_high_priority(): Returns True if the priority is “high”.
∗ set_priority(priority): Sets priority to “high”, “medium”, or “low”; prints a
message if an invalid value is given.
∗ __str__(): Extends the base class __str__ to include priority.
1
• WorkTask Class (inherits from Task)
– Attributes: Adds a list attribute for team_members.
– Methods:
∗ add_team_member(member): Adds a non-empty string as a team member name.
∗ __str__(): Extends the base class __str__ to include team members.
2. task_manager.py (3 points) Implement the TaskManager class to manage a collection of
Task objects with the following features:
• Attributes: List of tasks (self.tasks) and task_list_file_name (for saving/loading
tasks).
• Methods:
– add_task(task): Adds a new task to the task list.
– list_tasks(flag=None): Lists all tasks or only tasks of a specific type (personal or
work).
– delete_task(task): Deletes a task by matching its _task_id; prints a message if the
task is not found.
– save_task(): Saves all tasks to a CSV file named task_list.csv.
– load_task(): Load all tasks from a CSV file named task_list.csv.
– get_pending_tasks(): Uses a lambda function to filter and list pending tasks.
– get_overdue_tasks(): Uses list comprehension to list overdue tasks based on the cur-
rent date.
3. interface.py (1 point) Develop a menu-driven console interface for interacting with
the TaskManager class, implementing the following:
• A structured interface to allow users to:
– Create a task (selecting between PersonalTask and WorkTask types and entering nec-
essary details).
– View all tasks or filter by task type (personal or work).
– Delete a task by entering its task_id.
– Save the task list to a CSV file.
– Load tasks from a CSV file.
– View pending and overdue tasks.
Use loops and conditional statements to keep the menu active until the user opts to exit.
0.0.4 Documentation (3 points)
Create a README file that includes:
1. Overview: Briefly describe the purpose and features of the system.
2. Setup Instructions: Instructions on how to run the program, including dependencies.
3. Class and Method Descriptions: Detailed descriptions of each class and method, includ-
ing examples of usage.
4. Error Handling: Describe how the program handles invalid data and provides user feedback.
2
0.0.5 Oral Defense (10 points)
In your oral defense, you’ll present your code, explain your design choices, and demonstrate the
working system. Be prepared to discuss:
Oral Defense Grading Breakdown:
1. Presentation of Work (2 points):
• Clearly explain each class and method and their interactions within task.py,
task_manager.py, and interface.py.
• Discuss how you designed data validation and error handling.
• Describe the filtering and task listing functionalities.
2. Suggested Improvements (2 points):
• Present at least one additional feature you could add to improve the program.
• Implement at least two new error-handling mechanism to make the system more user-
friendly.
3. Q&A with Teacher (6 points):
• Answer practical questions related to the assignment.
0.0.6 Assignment Goals
This assignment will reinforce Python fundamentals and introduce you to class-based design, file
I/O, and user interface creation through a menu-driven console. Diligent work will help develop
your coding skills, and the project’s structure encourages you to think critically about software
design and documentation.
Good luck, and enjoy coding!