Design and implement a class ToDoList. An object of this class—let’s call it a to-do list—is a collection of strings that describe tasks a user wants to accomplish. Strings on this list appear in...






Design and implement a class ToDoList. An object of this class—let’s call it a to-do list—is a collection of strings that describe tasks a user wants to accomplish. Strings on this list appear in order, one after the other, just as they would had you written a list of tasks on paper. In other words, each string has a position on the list beginning with 1, as in the following example:




The list should be as long as the user desires. Give the to-do list the following behaviors:


• add—Add a new task to the end of the list


• remove—Remove and return the first task from the list


• replace—Replace and return a particular task, designated by its number, with a new task


• getCurrentSize—Return the current number of tasks on the list


• isEmpty—Return true if the list is empty or false if it is not


• clear—Erase all tasks from the list


Demonstrate your class ToDoList.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here