Environmental PDF
Environmental PDF
A program that helps users manage tasks for a week while incorporating
**searching, sorting, and linked list functionalities**. Users can add tasks,
track their completion status, and analyze their performance.
### **Features**
1. **Task Management**:
2. **Sorting Options**:
3. **Search Functionality**:
4. **Analysis Tools**:
5. **Linked Lists**:
- Use **singly linked lists** for dynamically adding and managing tasks.
- Show a detailed report of tasks, their statuses, and their completion rates.
1. **Add Tasks**:
- Users add tasks with a name and optional deadline. Tasks are stored
dynamically using linked lists.
2. **Track Completion**:
- Users can mark tasks as complete or incomplete for each day of the
week.
3. **Sorting**:
4. **Search**:
- Quickly search for a task by its name using Binary Search (after sorting
alphabetically).
5. **Task Analysis**:
- The system evaluates which tasks were completed the most and which
were least completed during the week.
### **Benefits**
- **Personal Organization**: Helps users stay on top of their weekly tasks and
deadlines.
- **Efficient Tools**: Sorting and searching improve accessibility and usability.
- **Dynamic Memory Usage**: Linked lists make the system more scalable
and efficient.
```cpp
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
// Task structure
Struct Task {
String name;
};
Cout << “Task \”” << name << “\” added with deadline: “ << deadline
<< “\n”;
Return;
Tasks[taskIndex].progress[day – 1] = true;
Cout << “Marked progress for \”” << tasks[taskIndex].name << “\” on
day “ << day << “.\n”;
}
// Insertion sort for sorting tasks alphabetically
Int j = I – 1;
Tasks[j + 1] = tasks[j];
--j;
Tasks[j + 1] = key;
If (tasks[mid].name == target)
Return mid;
Left = mid + 1;
Else
Right = mid – 1;
// Main function
Int main() {
Vector<Task> tasks;
Int choice;
Do {
Switch (choice) {
Case 1: {
Cin.ignore();
Getline(cin, name);
Getline(cin, deadline);
Case 2: {
break;
Case 3:
showSummary(tasks);
break;
case 4:
insertionSort(tasks);
break;
case 5: {
string target;
cin.ignore();
getline(cin, target);
if (result != -1)
else
cout << “Task not found.\n”;
break;
Case 6:
Break;
Default:
Return 0;
```
---