Question: Write a program in Java that: 1. will prompt user with a menu that contains options to: a. Add a To-Do Item to a todo

Write a program in Java that:

1. will prompt user with a menu that contains options to:

a. Add a To-Do Item to a todo list. A To-Do Item contains:

i. An arbitrary reference number (4; 44,004; etc.)

ii. A text description of the item ("Pick up dry cleaning", etc.)

iii. A priority level (1, 2, 3, 4, or 5)

b. View an item in the list (based on its reference number)

c. Delete an item from the list (based on its reference number)

d. Display all items in the list, sorted by reference number e. Display all items in the list, sorted by priority level

2. Program must be implemented in an object-oriented fashion. You must create 2 classes:

a. A To-Do List class that stores the list itself, and has all the methods in it needed to interact with the list. All methods for adding, deleting, sorting, and viewing the list must be implemented in this class, not in main().

b. A To-Do Item class that contains the reference number, text, and priority, and any other methods as needed.

3. You may use any method you like to actually store the data, but I would humbly suggest that an ArrayList might be a good way.

4. You must use try catch statements to check user input and catch common errors. Your program should not crash because of bad user input at any point.

** this question was answered previously and worked well but The remove option does not work and the program fails (does not continue) if you answer with a letter instead of a number. link to that code: http://www.chegg.com/homework-help/questions-and-answers/write-program-java-1-prompt-user-menu-contains-options--add-item-todo-list-item-contains---q18848664 **

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!