Question: Create a C++ program that replicates the functionality of your Lab#3 orogram, except this time we will break down the code into functions. Fill in

Create a C++ program that replicates the functionality of your Lab#3 orogram, except this time we will break down the code into functions. Fill in the blanks and create the following functions in your code: 1.) string RequestPassword() This function should ask the user to enter a password and then return the value they entered as a string 2.) int CheckPassword ( string userPassword) This should check if the user's password Is valid (i.e. myPassword123!) If it is valid: print "Correct!" and return 1 Else if it is close: print "Close, but still incorrect." and return 0 Else: print "Incorrect." and return 0 3.) void PrintStatus ( int status ) This checks the user's final status If the user got the password correct (i.e. status == 1): print "Access Granted" and return Else the user guessed incorrectly 3 times (i.e. status ==0 ): print "You have been locked out of this account" and return Create a C++ program that replicates the functionality of your Lab#3 orogram, except this time we will break down the code into functions. Fill in the blanks and create the following functions in your code: 1.) string RequestPassword() This function should ask the user to enter a password and then return the value they entered as a string 2.) int CheckPassword ( string userPassword) This should check if the user's password Is valid (i.e. myPassword123!) If it is valid: print "Correct!" and return 1 Else if it is close: print "Close, but still incorrect." and return 0 Else: print "Incorrect." and return 0 3.) void PrintStatus ( int status ) This checks the user's final status If the user got the password correct (i.e. status == 1): print "Access Granted" and return Else the user guessed incorrectly 3 times (i.e. status ==0 ): print "You have been locked out of this account" and return
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
