Reference no: EM132210197
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!