This Python program is a simple Task Management System that allows users to create, edit, track, and display tasks. It uses Object-Oriented Programming (OOP) principles to create a structured system for managing tasks.
Before working on this program, students should have a basic understanding of the following concepts:
- Python programming fundamentals (variables, functions, classes, objects).
- Inheritance and abstract classes in Python.
- Working with dates and times in Python (using the datetime module).
- Exception handling in Python.
- Basic knowledge of interfaces/abstract classes (Python ABC).
- Task Management Class (
TaskManagement
) This class serves as the core component of the task management system.
- It maintains a list (
task_list
) to store all task objects. - It provides methods to add new tasks and display the list of existing tasks.
- Task Scheduling (Handled via instantiating
PersonalTask
orWorkTask
) While not represented by a separate class in the code, task creation and classification are performed by instantiatingPersonalTask
andWorkTask
.
- These objects are then added to
TaskManagement
. - It ensures appropriate task typing by using inheritance.
- Task Editing Class (
TaskEditing
) This class enables various edit operations on existing tasks.
- Students learn how to modify task attributes such as
status
,priority
, anddeadline
. - It also demonstrates how to find tasks by ID and update their attributes.
- Task Tracking Class (
TaskTracking
) This class allows for tracking the state and metadata of tasks.
- Students can retrieve task status, deadline, and color by task ID.
- It provides read-only access to key attributes.
- Abstract Base Class (
Task
) Defines the common structure and behavior for all task types.
- Includes attributes such as
task_id
,task_name
,deadline
,status
,priority
, andcolor
. - Contains a method to calculate the number of days left until the deadline.
- Declares an abstract method
color_your_task()
to be implemented by subclasses.
- Subclasses (
PersonalTask
andWorkTask
) These classes inherit fromTask
and define behavior specific to personal and work-related tasks.
- They implement the
color_your_task()
method to assign different colors. - Default priorities are also handled here (e.g.,
Low
for personal,High
for work). - Demonstrates inheritance and method overriding.
- Special Keywords Dictionary (
SPECIAL_KEYWORDS
) A global dictionary maps strings like"today"
,"tomorrow"
, and"next week"
to actual dates usingdatetime
.
- Teaches students about dictionary usage and date manipulation in Python.
- Core Object-Oriented Programming concepts: classes, objects, inheritance, and abstract base classes.
- Proper encapsulation and separation of concerns (management, editing, and tracking are decoupled).
- Exception handling and task lookup strategies.
- Working with date and time using Python’s
datetime
module. - Using dictionaries for keyword mapping and processing.
- Implementing and overriding abstract methods in subclasses.
- Create a new task type (e.g.,
StudyTask
) that inherits fromTask
and implements custom behavior and attributes. - Extend the editing functionality to include features like setting a task note or changing the color manually.
- Add the ability to sort tasks by priority or deadline.
- Develop a simple command-line interface (CLI) or GUI to interact with the task manager.
- Write unit tests to verify that core functionalities (adding, editing, tracking) work as expected.
By working on these exercises, students will strengthen their understanding of OOP principles and improve their Python software development skills.
Below, you will find screenshots of Python class code for a Note application. Carefully examine the code and draw a UML (Unified Modeling Language) class diagram according to the following instructions:
-
Indicate the name of each class.
-
List the attributes (fields) and methods of each class.
-
Show the relationships between classes correctly.
-
If applicable, indicate collections like List<Note> explicitly in your diagram
-
sWAP cASE: https://www.hackerrank.com/challenges/swap-case/problem
-
String Split and Join: https://www.hackerrank.com/challenges/python-string-split-and-join/problem
-
Mutations: https://www.hackerrank.com/challenges/python-mutations/problem
-
Text Wrap: https://www.hackerrank.com/challenges/text-wrap/problem