Page 1 of 1

Using java on netbeans:

Posted: Sun May 15, 2022 2:09 pm
by answerhappygod
Using java on netbeans:
Using Java On Netbeans 1
Using Java On Netbeans 1 (20.42 KiB) Viewed 66 times
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. a. Create an account by entering username, password, first name and last name. The system needs to check that the following conditions are met, and reply with the appropriate output message:

Conditions Messages True False "Username "Username is not Username contains an underscore and is no more than 5 characters long successfully captured" "Password Password meets the following password complexity rules, the password must be: correctly formatted, please ensure that your username contains an underscore and is no more than 5 characters in length." "Password is not correctly formatted, please ensure that the password contains at least 8 characters, a capital letter, a number and a special character." successfully captured" At least 8 characters long Contain a capital letter Contain a number Contain a special character 2. a. Login to the account using the same username and password. The system should provide the following messages to verify the user's authentication state:

Conditions Messages True False "Username or The entered username and password are correct, and the user is able to log in. "Welcome <user first name>,<user last name> it is great to see you again. 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.

Method Name Method Functionality Boolean: checkUserName() This method ensures that any username contains an under score) and is no more than This method ensures that passwords meet the following password complexity rules, the password must be: Boolean: checkPasswordComplexity() At least eight characters long. String registerUser() Contain a capital letter Contain a number Contain a special character 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. This method verifies that the login details entered matches the login details stored when the user registers. This method returns the necessary messaging for: A successful login A failed login Boolean login User() String returnLoginStatus 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: Test Data: "kyl_1" The username contains an underscore and is no The system returns: more than 5 characters long "Welcome <user first name>,<user last name> it is great to see you." Username incorrectly formatted: Test Data: "kyle!!!!!!!"

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." Test Data: "Ch&&sec@ke99!" The system returns: "Password successfully captured" Test Data: "password" The password meets the complexity requirements The password does not meet the complexity requirements 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 Username correctly formatted The system returns: False The system returns: True The system returns: False The system returns: True Username incorrectly formatted Password meets complexity requirements Password does not meet complexity The system returns: requirements False

5. Watch the following video to help you create the necessary unit tests in NetBeans: (22 February 20221 ** 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 Cl in mind. We will be implementing GitHub actions to: Automate the tests we have written to run whenever we updated our code. Make sure you have signed up for the GitHub student developer pack Follow the steps detailed below to automate your tests using GitHub Actions: (22 February 2022]. a. i. ii.