Question
Write a program to help a user automate their to-do list. The program should do the following: Show the user the different actions they can
Write a program to help a user automate their to-do list. The program should do the following:
- Show the user the different actions they can perform on the list (add, remove tasks, display task...).
- Allow the user to select one of the actions.
- Execute that action
The to-do list will be read from the file:
Name of the task Due date (mm dd yyyy) Priority
Learn basic Python 12 12 2021 3
Implement a snake game 04 01 2021 1
Clean up my room 01 10 2021 2
Build my resume 12 12 2021 3
Study for the exam 03 05 2021 1
Learn how to juggle 05 06 2022 3
Create a website using React 12 07 2021 2
Have a tea and self-reflect 03 01 2021 2
Modify the existing code. Use an array, tasks, of the struct Task, with three components: name of the type string, dueDay, dueMonth, dueYear of type double, isCompleted of type bool, and priority of type int. Your program must contain at least the following functions:
- (20 points) Function getData: This function loads the data from a file named tasks.txt with the above items into the array tasks.
- Function viewTasks: This function shows the list of all to-do items with due date and status.
- (20 points) Function addTasks: This function will add one new task to the to-do list. If no more space displays a message No more space.
- (20 points) Function completeTask: This function will mark the chosen task as completed.
- (20 points) Function removeTask: This function will remove one task from the list.
- (10 points) Function sortTasks: This function will sort the list by dueDate. (extra credit)
- (20 points) Function taskSummary: This function displays the number of tasks in the to-do list and the percentage of tasks completed
Sample output is:
Summary of Johnnys To-Do List
Total number of tasks 8
Percentage completed 25%
Please use the library files such as #include
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started