Implement and Debug a Program
Unit 1: Programming
HNC Computing
,Contents
Requirement Specification............................................................................................................................................................................................................. 3
Registration Form:...................................................................................................................................................................................................................... 3
User Info Form:.......................................................................................................................................................................................................................... 4
Registered User Form:............................................................................................................................................................................................................... 4
Visual evidence of creating the program....................................................................................................................................................................................... 4
Visual evidence that the code works............................................................................................................................................................................................. 9
Visual evidence of registered users page................................................................................................................................................................................. 11
Code Explanation......................................................................................................................................................................................................................... 12
Registration Page Form Explanation......................................................................................................................................................................................... 12
User Info Form page explanation............................................................................................................................................................................................. 14
Registered Users Form Explanation......................................................................................................................................................................................... 15
Coding Standard.......................................................................................................................................................................................................................... 17
Features of Integrated Development Environment (IDE).............................................................................................................................................................21
IDE Features used in the code:................................................................................................................................................................................................. 21
Features not utilized:............................................................................................................................................................................................................... 22
Secure and robust application..................................................................................................................................................................................................... 23
Role and Purpose of Coding Standards:....................................................................................................................................................................................... 24
THE CODE:.................................................................................................................................................................................................................................... 26
Registration form..................................................................................................................................................................................................................... 26
Userinfo form:.......................................................................................................................................................................................................................... 30
, Registered user form:............................................................................................................................................................................................................... 31
Requirement Specification
Registration Form:
Overview: The Registration Form facilitates user registration, ensuring valid input and providing feedback to the user. It includes functionality to submit
registration details, view registered users, and navigate to a user information form upon successful registration.
1. User Input Validation:
The system validates that all required fields (name, email, password, confirm password, date of birth, and gender) are filled in before
submission.
The email address entered must be in a valid format, verified using the MailAddress class, and an appropriate error message is displayed if it is
invalid.
Users must be at least 18 years old to register, and an error message is shown if the age criterion is not met.
Passwords must meet specific criteria, including a minimum length of 4 characters, at least one uppercase letter, one lowercase letter, and one
digit.
An error message is displayed if the entered password and confirmed password do not match.
Users must select a gender; otherwise, an error message is shown.
2. Data Persistence:
User registration details are saved to application settings, specifically the "RegisteredUsers" StringCollection.
The user counter is incremented and saved to track the number of registered users.
3. Feedback and Navigation:
A success message is displayed upon successful registration.
Users are then navigated to a UserInfoForm, displaying the registered user's details.
, User Info Form:
Overview: The UserInfoForm displays detailed information about a registered user, including their name, email, date of birth, gender, and password.
1. Display User Information:
User details are received through the constructor and displayed in labels (Name, Email, Date of Birth, Gender).
2. View Registered Users:
A button allows users to navigate to the Registration Page Form (FormRegisteredUsers) to view the list of all registered users.
Registered User Form:
Overview: The FormRegisteredUsers form displays a list of registered users with options to sort by name or date of birth.
1. Load and Display Users:
Upon loading, the form retrieves registered users from application settings and populates a ListBox with user entries.
2. Sort Users:
Users can sort the list by name or date of birth using corresponding buttons. Sorting is achieved by clearing the ListBox and ordering the users based
on the chosen criteria.
3. Navigation:
A button allows users to navigate back to the Registration Form (FormRegistration) to register new users.
Visual evidence of creating the program
I have used label, textbox, and button to create
Unit 1: Programming
HNC Computing
,Contents
Requirement Specification............................................................................................................................................................................................................. 3
Registration Form:...................................................................................................................................................................................................................... 3
User Info Form:.......................................................................................................................................................................................................................... 4
Registered User Form:............................................................................................................................................................................................................... 4
Visual evidence of creating the program....................................................................................................................................................................................... 4
Visual evidence that the code works............................................................................................................................................................................................. 9
Visual evidence of registered users page................................................................................................................................................................................. 11
Code Explanation......................................................................................................................................................................................................................... 12
Registration Page Form Explanation......................................................................................................................................................................................... 12
User Info Form page explanation............................................................................................................................................................................................. 14
Registered Users Form Explanation......................................................................................................................................................................................... 15
Coding Standard.......................................................................................................................................................................................................................... 17
Features of Integrated Development Environment (IDE).............................................................................................................................................................21
IDE Features used in the code:................................................................................................................................................................................................. 21
Features not utilized:............................................................................................................................................................................................................... 22
Secure and robust application..................................................................................................................................................................................................... 23
Role and Purpose of Coding Standards:....................................................................................................................................................................................... 24
THE CODE:.................................................................................................................................................................................................................................... 26
Registration form..................................................................................................................................................................................................................... 26
Userinfo form:.......................................................................................................................................................................................................................... 30
, Registered user form:............................................................................................................................................................................................................... 31
Requirement Specification
Registration Form:
Overview: The Registration Form facilitates user registration, ensuring valid input and providing feedback to the user. It includes functionality to submit
registration details, view registered users, and navigate to a user information form upon successful registration.
1. User Input Validation:
The system validates that all required fields (name, email, password, confirm password, date of birth, and gender) are filled in before
submission.
The email address entered must be in a valid format, verified using the MailAddress class, and an appropriate error message is displayed if it is
invalid.
Users must be at least 18 years old to register, and an error message is shown if the age criterion is not met.
Passwords must meet specific criteria, including a minimum length of 4 characters, at least one uppercase letter, one lowercase letter, and one
digit.
An error message is displayed if the entered password and confirmed password do not match.
Users must select a gender; otherwise, an error message is shown.
2. Data Persistence:
User registration details are saved to application settings, specifically the "RegisteredUsers" StringCollection.
The user counter is incremented and saved to track the number of registered users.
3. Feedback and Navigation:
A success message is displayed upon successful registration.
Users are then navigated to a UserInfoForm, displaying the registered user's details.
, User Info Form:
Overview: The UserInfoForm displays detailed information about a registered user, including their name, email, date of birth, gender, and password.
1. Display User Information:
User details are received through the constructor and displayed in labels (Name, Email, Date of Birth, Gender).
2. View Registered Users:
A button allows users to navigate to the Registration Page Form (FormRegisteredUsers) to view the list of all registered users.
Registered User Form:
Overview: The FormRegisteredUsers form displays a list of registered users with options to sort by name or date of birth.
1. Load and Display Users:
Upon loading, the form retrieves registered users from application settings and populates a ListBox with user entries.
2. Sort Users:
Users can sort the list by name or date of birth using corresponding buttons. Sorting is achieved by clearing the ListBox and ordering the users based
on the chosen criteria.
3. Navigation:
A button allows users to navigate back to the Registration Form (FormRegistration) to register new users.
Visual evidence of creating the program
I have used label, textbox, and button to create