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.
21; 22; 23 2023
© The Independent Institute of Education (Pty) Ltd 2023 Page 12 of 22
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”
21; 22; 23 2023
© The Independent Institute of Education (Pty) Ltd 2023 Page 13 of 22
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.

Here are the step-by-step instructions to complete the given tasks:

1. Create and work with Loops:
- Implement a loop in your application to repeatedly prompt the user for input and perform actions until they choose to quit.
- Use a while loop or a do-while loop to achieve this functionality.

2. Handle and manipulate strings:
- Use string manipulation methods to handle and validate the user input.
- Implement a method in the Task class called `checkTaskDescription()` that checks if the task description is not more than 50 characters. Return a boolean value indicating whether or not the description is valid.

3. Create a feature branch:
- Open your command line interface and navigate to the project directory.
- Run the following command to create a new feature branch:
```
git checkout -b KhanbanTasks
```
- Replace "KhanbanTasks" with your desired branch name.

4. Implement login functionality:
- Before allowing users to add tasks, implement a login feature where they need to successfully log in.
- You can use any authentication method or store user credentials in a database.
- Display an error message if the login fails, and allow tasks to be added only after successful login.

5. Display a welcome message:
- Implement a method in your application that displays the message "Welcome to EasyKanban" when the application starts.

6. Display a numeric menu:
- Implement a method that displays a numeric menu for the user to choose from.
- Display the following options:
- Option 1) Add tasks
- Option 2) Show report (this feature is still in development and should display the message "Coming Soon")
- Option 3) Quit
- Prompt the user to enter their choice and handle their selection accordingly.

7. Implement task creation and validation:
- When the user selects option 1 to add tasks, prompt them to enter the number of tasks they want to add.
- Store this value and use it to limit the number of tasks they can enter.
- For each task, prompt the user to enter the task details including the task name, task description, developer details, task duration, and task status.
- Validate the task description using the `checkTaskDescription()` method from the Task class.
- Generate an auto-generated task ID using the `createTaskID()` method from the Task class.

8. Display task details:
- After a task has been entered, display the full details of the task using a JOptionPane or an equivalent dialogue box.
- Display the task status, developer details, task number, task name, task description, task ID, and task duration in the order specified.

9. Accumulate and display total hours:
- Implement a method in the Task class called `returnTotalHours()` that calculates and returns the total combined hours of all entered tasks.
- Use a loop to iterate through all the tasks and accumulate their durations.
- Test the method using the provided test data and assert that the returned total is correct.

10. Implement unit tests:
- Create unit tests to verify the functionality of the Task class methods.
- Test the `checkTaskDescription()` method to assert that it correctly handles both successful and failed validations.
- Test the `createTaskID()` method to assert that it generates the correct task ID based on the provided data.
- Test the `returnTotalHours()` method to assert that it correctly accumulates the task durations and returns the expected total.
- Use the provided test data to perform these tests and compare the results with the expected outputs.

By following these step-by-step instructions, you should be able to complete the given tasks and achieve the desired functionality in your application.