Using Java Programming Language At the end of this specific task, students should be able to: • Create classes, methods,

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Using Java Programming Language At the end of this specific task, students should be able to: • Create classes, methods,

Post by answerhappygod »

Using Java Programming Language
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:
- Username contains an underscore and is no more than 5
characters long
True: “Username successfully captured”
False “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
True: “Password successfully captured”
False: “Password is not correctly formatted, please ensure that the
password contains at least 8 characters, a capital letter, a number
and a special character.”
b. Login to the account using the same username and
password.
The system should provide the following messages to verify the
user’s authentication state:
The entered username and password are correct, and the user is
able to log in.
True: “Welcome <user first name> ,<user last name> it
is great to see you again.
False: “Username or password incorrect, please try again”
c. 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.
Using Java Programming Language At The End Of This Specific Task Students Should Be Able To Create Classes Methods 1
Using Java Programming Language At The End Of This Specific Task Students Should Be Able To Create Classes Methods 1 (43.35 KiB) Viewed 51 times
Using Java Programming Language At The End Of This Specific Task Students Should Be Able To Create Classes Methods 2
Using Java Programming Language At The End Of This Specific Task Students Should Be Able To Create Classes Methods 2 (13.62 KiB) Viewed 51 times
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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply