This assignment is intended to see if youve learned the basic concepts talked about thus far in the lectures.
This assignment requires the use of structures
In this assignment, you will define a structure, and then create and populate some with data from the user.
The structure should contain a positive unsigned int representing priority (closer to 1 representing higher priority), and a string (C++ string object) representing a task that the user must do, eg;
You must write 3 functions with the given signatures/prototypes:
1. Returns a pointer to a new ToDo structure instance.
ToDo* newTodo()
2. Given an array of ToDo pointers returns a pointer to the first ToDo with the highest priority. (remember, the lowest integer value is the highest priority)
ToDo* getFirstPriority(ToDo**, int)
3. Given a pointer to an array of ToDo pointers, releases the associated memory.
void empty(ToDo**, int);
The programs entry point function (main) has been written for you, do not alter this function.
You must implement the three functions above and define a structure that will work with the code provided. Start your program using the code attached to this assignment (A08.cpp).
How many Tasks will there be?
3
What is the task?
Cleaning
What is the priority of this task?
2
What is the task?
Assignment 8
What is the priority of this task?
1
What is the task?
Watch Stranger Things
What is the priority of this task?
5
You should do "Assignment 8" first.