Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

How is the NDAA used to shape defense policies indirectly?

Answered: 1 week ago

Question

=+ Are there additional forms of employee representation?

Answered: 1 week ago

Question

=+What is the nature of their impact?

Answered: 1 week ago