- Main objectives
- Installed Dependencies
- Methods, Classes and other Object oriented programming constructs used
- Decisions used
- Expected user Inputs and outputs
- LoginTests conducted
- Final program results
- Reference List
- Create a program with login and registration features
- The login features must enable users to accept user inputs to capture username, password and South african cell number
- Add conditions to accept username, password and cellphone number in a certain formatting e.g, the accepted format of a username is taken only when a user meets the condition for the username to contain an underscore and is no longer than 5 characters long, whereas a password must meet complexity rules ranging from it being atleast 8 characters long, contain a capital letter, a number and a special character. Furthermore, The cell phone number contains the international country code followed by the number, which is no more than ten characters long.
The necessary dependencies and necessities needed to run the program included:
- To create the maven project we had to select the maven-archetype-quickstart.
- Then set the groupId as za.ac.iie.prog5121 and the artifactId as quickchat, resulting in the package namely za.ac.iie.prog5121.quickchat.
- The project structure includes pom.xml - for dependencies and property management, src/main/java - for the main.java file which contains a main class enabling us to run the entire project and the login.java file to write the project's methods and classes for the login and registration features in the app.
- We had to edit pom.xml and replace junit 4 with junit-jupiter (JUnit 5) as well as adding a maven surefire plugin to ensure that Maven uses jUnit 5 whenever the project runs.
Note
These are used to store registration states: private String registeredUsername; private String registeredPassword; private String registeredCell. More methods were created to use regex patterns to determine the factors necessary in inputting your username and password,etc - these methods utilized regex patterns to allow special characters, digits, capital letters and the length of the username and passwords.
- first name
- last name
- user name
- password
- cell number
- registration failed messages(if user inputs the password, cell number or user name incorrectly)
- login successful messages(when user enters details accordingly)
Apache Software Foundation (2025) Apache Maven [Computer program]. Available at: https://maven.apache.org/ (Accessed: 15 September 2025).
JUnit (2025) JUnit 5 [Computer program]. Available at: https://junit.org/junit5/ (Accessed: 15 September 2025).
OpenAI (2025) ChatGPT (GPT-5) [Computer program]. Available at: https://chat.openai.com/ (Accessed: 15 September 2025).
Oracle (2025) Java SE Development Kit (JDK) [Computer program]. Available at: https://www.oracle.com/java/ (Accessed: 15 September 2025).
W3Schools (2025) Java Tutorial. Available at: https://www.w3schools.com/java/ (Accessed: 15 September 2025).