Question: Part ( a ) - Encapsulation to Protect User Credentials: Implement a User class in C + + where the email and password fields are
Part a Encapsulation to Protect User Credentials: Implement a User class in C where the email and password fields are private. Create getter and setter methods to access and modify these private fields. Ensure the setter methods include input validation for the following: Email format: The email should contain an @ symbol and a domain eg @example.com Password strength: The password must be at least characters long, containing: At least one uppercase letter, At least one lowercase letter, At least one special character. Part b Signup Validation: Implement a signup function in C that: Prompts the user to enter a valid email and password. Validates the entered email and password based on the rules described in part a Displays appropriate error messages if the email or password is invalid, and prompts the user to reenter their credentials until valid ones are provided. Write a code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
