Question
C++ programming. Please use LOOP in your code, and provide detailed comments for everything that is included in the code. Thank you very much. Question
C++ programming. Please use LOOP in your code, and provide detailed comments for everything that is included in the code. Thank you very much.
Question 4: (Please use LOOP only) When a user wants to access one of the university's servers, he must identify himself using a username and password. These data must be validated and only once both data entered. Write the C++ program (use loop only) that reads the code and the password. The program then validates the data as follows:
- The program displays Welcome, you have access to the network, if the user enters UQAM as user code and Z425_H23 as password. The code is not case sensitive, however the password is case sensitive.
- Si lutilisateur n'entre pas le code et le mot de passe attendus, deux messages sont afficher :
- A first message to be displayed is determined according to the following order: Unknown user if the user code is invalid Incorrect password, if the code is valid and the password is invalid
- A second message to display is determined by the number of attempts:
Contact your administrator if the user is on their third unsuccessful attempt. The program then stops.
Try again if the user is on their first or second unsuccessful attempt.
Example 1:
Enter your user code: Uqam Enter your password: Z425_H23 Welcome, you have access to the network
Example 2:
Enter your user code: UQaM Enter your password: Z425_H22 incorrect password Try again Enter your user code: Uqom Enter your password: Z425_H23 unknown user Try again Enter your user code: Uqam Enter your password: Z425_H23 Welcome, you have access to the network
Example 3: Enter your user code: Uqam Enter your password: Z425_H22 incorrect password Try again Enter your user code: Uqom Enter your password: Z425_H23 unknown user Try again Enter your user code: Uqom Enter your password: Z425_H22 unknown user Contact your administrator
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started