QUESTION

Task 1 — Registration and login feature (Marks: 40) At the end of this specific task, students should be able to: • Create classes, methods, and other OOP programming constructs. • Use decisions • Produce an application that accepts input and returns output • (Learning unit 1-4) Your very first task is to create a registration and login feature. This feature needs to allow users to (Read through the entire task before you start any work): 1. Create an account by entering username, password, first name and last name. a. The system needs to check that the following conditions are met, and reply with the appropriate output message: 21; 22; 23 2022 Conditions Messages True False Username contains an underscore and is no more than 5 characters long “Username successfully captured” “Username is not correctly formatted, please ensure that your username contains an underscore and is no more than 5 characters in length .” Password meets the following password complexity rules, the password must be: • At least 8 characters long • Contain a capital letter • Contain a number • Contain a special character “Password successfully captured” “Password is not correctly formatted, please ensure that the password contains at least 8 characters, a capital letter, a number and a special character.” 2. Login to the account using the same username and password. a. The system should provide the following messages to verify the user’s authentication state: Conditions Messages True False The entered username and password are correct, and the user is able to log in. “Welcome , it is great to see you again. “Username or password incorrect, please try again” 3. You will need to implement a Login class with the following methods to ensure that your application meets good coding standards and that the code you write is testable. 21; 22; 23 2022 Method Name Method Functionality Boolean: checkUserName() This method ensures that any username contains an under score (_) and is no more than Boolean: checkPasswordComplexity() This method ensures that passwords meet the following password complexity rules, the password must be: • At least eight characters long. • Contain a capital letter • Contain a number • Contain a special character String registerUser() This method returns the necessary registration messaging indicating if: • The username is incorrectly formatted • The password does not meet the complexity requirements. • The two above conditions have been met and the user has been registered successfully. Boolean loginUser() This method verifies that the login details entered matches the login details stored when the user registers. String returnLoginStatus This method returns the necessary messaging for: • A successful login • A failed login 4. It is good practice to never push code that has not been tested, you will need to create the following unit tests to verify that your methods are executing as expected: Test: (assertEquals) Test Data and expected system responses. Username is correctly formatted: The username contains an underscore and is no more than 5 characters long Test Data: “kyl_1” The system returns: “Welcome , it is great to see you.” Username incorrectly formatted: Test Data: “kyle!!!!!!!” 21; 22; 23 2022 The username does not contain an underscore and is no more than 5 characters long The system returns: “Username is not correctly formatted, please ensure that your username contains an underscore and is no more than 5 characters in length.” The password meets the complexity requirements Test Data: “Ch&&sec@ke99!” The system returns: “Password successfully captured” The password does not meet the complexity requirements Test Data: “password” The system returns: “Password is not correctly formatted, please ensure that the password contains at least 8 characters, a capital letter, a number and a special character.” Test (assertTrue/False) Login Successful The system returns: True Login Failed The system returns: False Username correctly formatted The system returns: True Username incorrectly formatted The system returns: False Password meets complexity requirements The system returns: True Password does not meet complexity requirements The system returns: False 5. Watch the following video to help you create the necessary unit tests in NetBeans: https://www.youtube.com/watch?v=2EIUHHoVfmU [22 February 2022] ** Make sure to use the test data detailed in the table for assertEquals as this will be used to mark your task. 21; 22; 23 2022 6. Finally, developers make use of Continuous Integration and Continuous Deployment (CI/CD) pipelines to iteratively build systems and to test not only the functionality but also the quality of their code. It is good practice to start working with at least CI in mind. We will be implementing GitHub actions to: a. Automate the tests we have written to run whenever we updated our code. i. Make sure you have signed up for the GitHub student developer pack ii. Follow the steps detailed below to automate your tests using GitHub Actions: https://www.youtube.com/watch?v=b3cIRsVPLR4&t=282s [22 February 2022]. Task 2 — Adding Tasks feature (Marks: 55) 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: a. Option 1) Add tasks 21; 22; 23 2022 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 2022 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” 21; 22; 23 2022 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 They 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 21; 22; 23 2022 The system should return: 1) 18 on the last iteration of the loop 2) 89 for the additional data Task 3 —Store Data and Display Task Report (Marks: 65) At the end of this specific task, students should be able to: • Handle and manipulate strings • Create and work with Arrays You will now add the final features to your app , write and automate the unit tests and submit your final project. Extend your application to allow for the following: 1. Users should be able to use to populate the following arrays: Array Contents Developer Contains the names of all the developers assigned to tasks Task Names Contains the names of all the created tasks Task ID Contains the generated taskID’s for all tasks Task Duration Contains the Duration of all tasks Task Status Contains the Status of all tasks 2. Users should be able to use these arrays to: a. Display the Developer, Task Names and Task Duration for all tasks with the status of done. b. Display the Developer and Duration of the class with the longest duration. c. Search for a task with a Task Name and display the Task Name, Developer and Task Status. d. Search for all tasks assigned to a developer and display the Task Name and Task Status. e. Delete a task using the Task Name. f. Display a report that lists the full details of all captured tasks. 21; 22; 23 2022 3. Use the following test Data for your unit tests and to populate your arrays: Test Data Task 1 Developer Mike Smith Task Name Create Login Task Duration 5 Task Status To Do Test Data Task 2 Developer Edward Harrison Task Name Create Add Features Task Duration 8 Task Status Doing Test Data Task 3 Developer Samantha Paulson Task Name Create Reports Task Duration 2 Task Status Done Test Data Task 4 Developer Glenda Oberholzer Task Name Add Arrays Task Duration 11 Task Status To Do 4. Create the following unit tests: 21; 22; 23 2022 Test: (assertEquals) Test Data and expected system responses. Developer array correctly populated: The developer array contains the expected test data. Test Data: Developer entry for Test data for tasks 1-4 The system returns: "Mike Smith", "Edward Harrington" , "Samantha Paulson", "Glenda Oberholzer" Display Developer and Duration for task with longest duration. Test Data: Task 1-4 The system returns: “Glenda Oberholzer, 11; Search for tasks Test Data: “Create Login The system returns: “ Mike Smith, Create Login” Search all tasks assigned to Developer Test Data: Samantha Paulson The system returns: Create Reports Delete Task from array Test Data: "Create Reports" The system returns: Entry “Create reports” successfully deleted Display Report The system returns

Public Answer

D8ATOE The First Answerer