This project requires you to design and implement a To-Do list by using Java. You must complete the program design with the UML class and activity diagrams first, then implement your program with Java and test your program completely.
A task indicates an event that shall be completed within a particular time. Usually, a task can contain four essential attributes, i.e., the title, the date, the time, and the location. Besides these four essential attributes, it may also contain other attributes, such as participants, duration, and etc. A To-Do list contains and manages multiple tasks. In this project, you are asked to design and implement a simple To-Do list program by using Java to manage a user’s tasks.
Your program shall have the follow essential functions to manage a To-Do list.
- The program shall display a main menu at beginning and ask the user to select an action. When the user inputs the index of the action, the program shall execute the corresponding action. After the action is complete, the program shall display the main menu again. This process shall be repeated until the user select the action to quit the program.
- The main menu shall have at least five items, i.e., add a new task, delete an existing task, delete all tasks, list all tasks, and exit the program. An example of the main menu could be:
1: Add a task
2: Delete a task
3: Delete all tasks
4: List all tasks
5: Exit the program
- When the user selects 1 to add a new task, the program shall allow the user to input the four essential attributes, i.e., task title, task date, task starting time, and the location, and create a new task based on this information. The program shall automatically assign a unique ID for the new task and insert the new task into the To-Do list. An example of the To-Do list with a new task could be:
- When the user selects 2 to delete an existing task, the program shall display all tasks in the To-Do list first, and ask the user to input the task ID for the deletion. Once the user input a valid ID, the program shall delete the task from the To-Do list.
- When the user selects 3 to delete all tasks, the program shall display all tasks in the To-Do list first, and ask the user to confirm the deletion of all tasks. Once the user confirms the deletion, the program shall delete all tasks in the To-Do list.
- When the user selects 4 to list all tasks, the program shall display all tasks in the To-Do list in the ascending order of Task ID.
- When the user selects 5 to exit the program, the program shall display a farewell message and terminate the program.
Your program can also have the follow optional functions to manage the To-Do list.
- The user shall be allowed to put extra two attributes (your choices) when creates the new task.
- The main menu has an extra item to allow the user to sort all tasks in the To-Do list. When this item is selected, the program will automatically sort all tasks based on the ascending order of the task’s date and time, i.e., the tasks with earlier date and time will be list before the tasks with later date and time, and display the sorted list.
- The main menu has an extra item to allow the user to search tasks in the To-Do list. When this item is selected, the program will ask the user to input a date in the format of “dd/mm/yyyy”. If the To-Do list contains tasks in the given date, the program will display them all. Otherwise, the program will let the user know there is no task in the given date.
Please follow the procedure to complete this project.
1. Draw UML class diagrams to show the design of your program
a. You shall draw a UML class diagram for each class in your program; Programming Fundamentals -3/4-
b. In each UML class diagram, you shall clearly specify the field data and methods. For the field data, you shall clearly specify the access level, the data type, and the variable name. For the methods, you shall clearly specify the access level, the return data type, the method name, and the data type for all arguments (if applicable). You must use the correct notations in the UML class diagram;
3. You shall also specify the associations between your UML class diagrams and their multiplicities.
2. Draw UML activity diagrams to show the detailed actions of your program
a. You shall draw a UML activity diagram for each item listed in the main menu;
b. Each activity diagram shall clearly show the procedure to explain how each action is executed. You can also indicate how the methods defined in the UML class diagrams are called in the activity diagrams by adding the comments;
c. You shall use the correct notations to create the UML activity diagrams.
3. Implement your program design using Java
- Put all classes in the same java file, i.e., ToDoList.java;
- The primary class’s name must be ToDoList;
4. Test your Java program
- Compile and execute your program;
- Test your program with different inputs. Please make sure all functions of your program are tested.
- Capture snapshots of the compilation and the execution of your program. Make sure all functions tests are captured.