Write a simple todo list application. This will require use of classes, objects, and possibly structs. Here are the requirements:
1. Menu-driven - upon running the program, the user should be prompted to press one of the following:
2. Remove a todo item from the list
- 1. Pick up milk
- 2. Drop off son at baseball
3. Add a todo item to the list
4. Complete a todo item
5. Quit
2. Todo item should be a class with the following private members:
Private
When first running the program, an empty todo list (array) should be created for storing todo items as they're added. When displaying todo items from the list (delete and toggle methods above), simply display their index within the list and add one (1). After a user chooses a todo to delete or toggle, use that menu-choice and subtract one (1) to find the item in the list (array).
I'll get you started with some sudo code:
// Prototype class
class Todo {
private:
string title;
bool done;
public:
string getTitle();
bool toggleTodo();
}
//Implementations
string Todo::getTitle() {
return title;
}
bool Todo::toggleTodo() {
return !done;
}
// Prototype functions (up to you to implement - see below)
void deleteTodo(int);
Todo addTodo(string, bool);
int main(){}
void deleteTodo(int todoIndex){}
Todo addTodo(string todoTitle, bool todoDone = false){}