At the end of this specific task, students should be able to:

• Create and work with Loops
• Handle and manipulate strings
• (Learning Units 4 and 5).
It is good practice to leave your main branch as your long live branch, this means that the code on this branch is always in perfect working order and tested. We make use of feature branches in order to ensure that any code we push to GitHub does not break our main branch. You can create a feature branch by running the following command.
git checkout -b KhanbanTasks (you can use any branch name)
** You are welcome to make use of GitHub desktop or your IDE to push code to GitHub if you are not comfortable with using the command line.
You can now add the following functionality to your application:
1. The users should only be able to add tasks to the application if they have logged in successfully.
2. The applications must display the following welcome message: “Welcome to EasyKanban”.
3. The user should then be able to choose one of the following features from a numeric menu:
21; 22; 23 2023
© The Independent Institute of Education (Pty) Ltd 2023 Page 10 of 22
a. Option 1) Add tasks
b. Option 2) Show report - this feature is still in development and should display the following message: “Coming Soon”.
c. Option 3) Quit
4. The application should run until the users selects quit to exit.
5. Users should define how many tasks they wish to enter when the application starts, the application should allow the user to enter only the set number of tasks.
6. Each task should contain the following information:
Task Name
The name of the task to be performed: “Add Login Feature”
Task Number
Tasks start with the number 0, this number is incremented and autogenerated as more tasks are added .
Task Description
A short description of the task, this description should not exceed 50 characters in length. The following error message should be displayed if the task description is too long:
“Please enter a task description of less than 50 characters”
OR
“Task successfully captured” if the message description meets the requirements.
Developer Details
The first and last name of the developer assigned to the task.
Task Duration
The estimated duration of the task in hours. This number will be used for calculations and should make use of an appropriate data type.
Task ID
The system must autogenerate a TaskID which contains the first two letters of the Task Name, a colon (:), the Task Number, a colon (:) and the last three letters of the developer
21; 22; 23 2023
© The Independent Institute of Education (Pty) Ltd 2023 Page 11 of 22
assigned to the task’s name. The ID should be displayed in all caps:
AD:0:INA
Task Status
The user should be given a menu to select the following task statuses from:
• To Do
• Done
• Doing
7. The full details of each task should be displayed on the screen (using JOptionPane) after it has been entered and should show all the information requested in the table above in the following order: Task Status, Developer Details, Task Number, Task Name, Task Description, Task ID and Duration;
7. The total number of hours across all tasks should be accumulated and displayed once all the tasks has been entered.
Create a Task class that contains the following messages:
Method Name
Method Functionality
Boolean: checkTaskDescription()
This method ensures that the task description is not more than 50 characters.
String: createTaskID()
This method creates and returns the taskID
String: printTaskDetails()
This method returns the task full task details of each task.
Int: returnTotalHours()
This method returns the total combined hours of all entered tasks.
8. Please use the following the following test data to create unit tests.
Test Data:
Num Tasks
2
Test Data for Task 1
Task Name
“Login Feature”
Task Number
Auto generated.
Task Description
“Create Login to authenticate users”
Developer Details
Robyn Harrison
Task Duration
8hrs
TaskID
Auto generated
Task Status
To Do
Test Data for Task 2
Task Name
“Add Task Feature”
Task Number
Auto generated.
Task Description
“Create Add Task feature to add task users”
Developer Details
Mike Smith
Task Duration
10hrs
TaskID
Auto generated
Task Status
Doing
9. Create the following unit tests:
Test AssertEquals:
Task Description should not be more than 50 Characters
Test for both success and failure
The system should return:
Success
“Task successfully captured”
Failure:
“Please enter a task description of less than 50 characters”
TaskID is correct
The system should return:
AD:1:BYN When supplied with the data from Test case 1
The system should test the remainder of the TaksIDs in a loop (refer to video):
CR:0:IKE, CR:1:ARD, CR:2:THA, CR:3:ND
Total Hours Correctly accumulated in loop
Additional test data:
1)Test Data for Task1 and Task2.
2: Num Tasks: 5, Durations: 10,12,55,11,1
The system should return:
1) 18 on the last iteration of the loop
2) 89 for the additional data

provided.

To accomplish this task, follow these step-by-step instructions:

1. Create a class called "Task" to represent each task.
2. Add the following instance variables to the Task class:
- taskName (String)
- taskNumber (int)
- taskDescription (String)
- devDetails (String)
- taskDuration (double)
- taskID (String)
- taskStatus (String)
- totalHours (static double, initialized to 0)

3. Implement the "checkTaskDescription" method in the Task class. It should return true if the task description is less than or equal to 50 characters, or false otherwise.

4. Implement the "createTaskID" method in the Task class. It should generate a taskID using the first two letters of the task name, the task number, and the last three letters of the developer's name.

5. Implement the "printTaskDetails" method in the Task class. It should return a string containing all the task details in the specified order: task status, developer details, task number, task name, task description, task ID, and task duration.

6. Implement the "returnTotalHours" method in the Task class. It should return the value of the static totalHours variable.

7. In your main program implementation, follow these steps:
- Display the welcome message: "Welcome to EasyKanban".
- Show the numeric menu options: "Option 1) Add tasks", "Option 2) Show report", "Option 3) Quit".
- Use a loop to repeatedly prompt the user for their choice until they select "Quit".
- For each option, add the necessary code to handle the functionality as described in the task requirements.

8. For option 1: "Add tasks", do the following:
- Prompt the user to enter the number of tasks they wish to enter.
- Create a loop to iterate the specified number of times.
- Inside the loop, prompt the user to enter the details for each task (task name, task description, developer details, task duration, etc.).
- Create a new Task object for each task entered and set its instance variables accordingly.
- Use the "checkTaskDescription" method to validate the task description input.
- If the description is valid, call the "createTaskID" method to generate the task ID and set the task status to "To Do".
- If the description is too long, display the appropriate error message.
- Display the full task details using JOptionPane.

9. After all tasks have been entered, display the accumulated total hours using the "returnTotalHours" method.

10. Implement option 2: "Show report", but display the message "Coming Soon" as specified in the requirements.

11. Implement option 3: "Quit", and exit the program.

12. Finally, create unit tests to verify the functionality of the Task class methods. Use the provided test data and compare the expected results with the actual results using assertions.

That's it! By following these step-by-step instructions, you should be able to successfully implement the required functionality for the EasyKanban application.