Task 1: Signup System In the StringAssignment.c file there are two global arrays of String namely emailArr and passArr. Implement the function signupUser() that takes two String as input, one for user email and another for password. You need to do the following checks: 1. Is the email in valid format? 2. Does the password contain at least 8 characters? 3. Does the password have both uppercase and lowercase letters? 4. Does the password contain digits? 5. Does the password contain any of the special characters ($ # * @)? If any of the checks returns false, the signup will not be successful. In that case you need to show proper error message, and return FAIL_VAL. Otherwise, the signup will be successful if all of these checks return true. In that case show success message, return the array index, and store the user email and the password into emailArr and passAarr respectively. N.B. You need to discard duplicate signup. Task 2: Login System Implement the function loginUser() that takes two String as input, one for user email and another for password. It will search for the given user email in emailArr. If the user email exists and the given password matches with the stored one against that email, then login will be successful and you should return the array index plus show a success message. Otherwise, login will be unsuccessful and you should return FAIL_VAL plus show a proper error message. Task 3:Build Profile In the StringAssignment.c file there are two more global arrays of String namely nameArr and addressArr. Implement the function buildUserProfile() that takes four String as input, one for user email, one for first name, one for last name, and another for the address. You need to do the following thing: 1. Concatenate first and last name to a single name field, and store it into nameArr at the proper index. 2. Store the address into addressArr at the proper index. 3. If no user is found against the given email, show error message. Task 4: Search 1. Implement the function searchByName() that takes one String input for name. You need to show the email, name, and address of those users found against that name. 2. Implement the function searchByAddress() that takes one String input for address. You need to show the email, name, and address of those users found against that address. For both of these searches: the search should be case insensitive and allow substring properties. If search fails to find the data, show error message.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 8PE: Write a program that reads in a line consisting of a students name, Social Security number, user ID,...
icon
Related questions
Question

Task 1: Signup System
In the StringAssignment.c file there are two global arrays of String namely emailArr and passArr.
Implement the function signupUser() that takes two String as input, one for user email and another for
password. You need to do the following checks:
1. Is the email in valid format?
2. Does the password contain at least 8 characters?
3. Does the password have both uppercase and lowercase letters?
4. Does the password contain digits?
5. Does the password contain any of the special characters ($ # * @)?
If any of the checks returns false, the signup will not be successful. In that case you need to show proper
error message, and return FAIL_VAL. Otherwise, the signup will be successful if all of these checks
return true. In that case show success message, return the array index, and store the user email and the
password into emailArr and passAarr respectively.
N.B. You need to discard duplicate signup.
Task 2: Login System
Implement the function loginUser() that takes two String as input, one for user email and another for
password. It will search for the given user email in emailArr. If the user email exists and the given
password matches with the stored one against that email, then login will be successful and you should
return the array index plus show a success message. Otherwise, login will be unsuccessful and you
should return FAIL_VAL plus show a proper error message.
Task 3:Build Profile
In the StringAssignment.c file there are two more global arrays of String namely nameArr and
addressArr. Implement the function buildUserProfile() that takes four String as input, one for user
email, one for first name, one for last name, and another for the address. You need to do the following
thing:
1. Concatenate first and last name to a single name field, and store it into nameArr at the proper
index.
2. Store the address into addressArr at the proper index.
3. If no user is found against the given email, show error message.

Task 4: Search
1. Implement the function searchByName() that takes one String input for name. You need to show
the email, name, and address of those users found against that name.
2. Implement the function searchByAddress() that takes one String input for address. You need to
show the email, name, and address of those users found against that address.
For both of these searches: the search should be case insensitive and allow substring properties. If search
fails to find the data, show error message.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning