SuperTutor

(15)

$15/per page/Negotiable

About SuperTutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Business & Finance See all
Accounting,Business & Finance,Economics,Engineering,HR Management,Math Hide all
Teaching Since: Apr 2017
Last Sign in: 234 Weeks Ago, 3 Days Ago
Questions Answered: 12843
Tutorials Posted: 12834

Education

  • MBA, Ph.D in Management
    Harvard university
    Feb-1997 - Aug-2003

Experience

  • Professor
    Strayer University
    Jan-2007 - Present

Category > Programming Posted 10 Jul 2017 My Price 15.00

you are developing a software package

You are developing a software package that requires users to enter their own passwords. Loop until the
passwords meet the software criteria. The password should be at least six characters long.
The password should contain at least one uppercase and one lowercase letter.
The password should have at least one digit. The program should have an isValid function that will test if the password is valid. Use the following code to
declare a password variable with a global constant int SIZE=80;
char password[SIZE];
Next, use a while(true) to continue looping until the user enters a valid password. Read in the password and
call the isValid program. You can use the isupper(), islower(), and isdigit() functions. For example,
if (isdigit(*password))
//if this is true, you know the password has at least one digit.
Output from Program:
Password requirements:
- The password should be at least six characters long.
- The password should contain at least one uppercase
- and one lowercase letter.
- The password should have at least one digit.
Enter a password: aaaaaaa
The password was invalid.
Password requirements:
- The password should be at least six characters long.
- The password should contain at least one uppercase
- and one lowercase letter.
- The password should have at least one digit.
Enter a password: aBcdEfg
The password was invalid.
Password requirements:
- The password should be at least six characters long.
- The password should contain at least one uppercase
- and one lowercase letter.
- The password should have at least one digit.
Enter a password: abc123D
The password is valid. Step 2: Processing Logic
Using the pseudocode below, write the code that will meet the requirements.
Declare constants SIZE and MIN
Function prototype for isValid
Main Function
Declare the password as a character array. While true
Display the password requirements
Get password from user
Call the isValid function
Display results of isValid function
isValid function
Declare Boolean variables
Use strlen command to determine the length of the password and if it is greater than MIN, set bool value to
true
Loop
Test if password has a lowercase letter
Test if password has an upperecase letter
Test if password has a digit
Go to next character (ie *password++;)
End loop
If all boolean values are true, return 1, else return 0

Attachments:

Answers

(15)
Status NEW Posted 10 Jul 2017 07:07 AM My Price 15.00

-----------

Attachments

file 1499671096-Solutions file.docx preview (51 words )
S-----------olu-----------tio-----------ns -----------fil-----------e -----------Hel-----------lo -----------Sir-----------/Ma-----------dam----------- T-----------han-----------k y-----------ou -----------for----------- yo-----------ur -----------int-----------ere-----------st -----------and----------- bu-----------yin-----------g m-----------y p-----------ost-----------ed -----------sol-----------uti-----------on.----------- Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m o-----------nli-----------ne -----------or -----------inb-----------ox -----------me -----------a m-----------ess-----------age----------- I -----------wil-----------l b-----------e q-----------uic-----------kly----------- on-----------lin-----------e a-----------nd -----------giv-----------e y-----------ou -----------exa-----------ct -----------fil-----------e a-----------nd -----------the----------- sa-----------me -----------fil-----------e i-----------s a-----------lso----------- se-----------nt -----------to -----------you-----------r e-----------mai-----------l t-----------hat----------- is----------- re-----------gis-----------ter-----------ed -----------onÂ----------- th-----------is -----------web-----------sit-----------e -----------Tha-----------nk -----------you----------- -----------
Not Rated(0)