Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am kind of confuse about this assignment please help. Please read really careful. I feel like this is confusing The password generation program is

I am kind of confuse about this assignment please help. Please read really careful. I feel like this is confusing

The password generation program is somewhat simple. First, the user will enter their last name. In this program, students that have last names beginning with A-M will change their passwords between the 15th and the 20th of every month. Students that have last names beginning with N-Z will change their passwords between the 20th and the 25th of every month. Next the user will input a multi-digit integer. Afterwards, the user will input a string. Lastly the user will select how many passwords they would like to generate with this information. The program then uses this information to randomly generate passwords using this data. The program will not execute if the current date is not correct. Using this information, please create a Black-Box testing plan for the program.

Task: You must design a complete Black-Box testing plan for the given program. Your task is to apply what you have learned about black-box testing techniques to develop a full suite of test data for this program. Use the template file provided in the Instructions and supporting files on BlackBoard to organize your tests and test data.

Your file must include the following four sections with test data for each:

1. Test data that covers representative inputs

2. Test data that provides functional coverage

3. Test data that provides for boundary-values testing

4. Test data that implements special-values testing

this right here is the template that they gave us:

Assignment 3 Solution Template

Fill in the information for each test that you develop for the 4 tables below. Add more rows as required to list all possible tests for each type. Do not repeat tests which have already been used to test a particular description. Use as many rows as needed to capture all of your tests. Each of the four tables may span more than one page if necessary.

Representative Input Tests

Test #

Test Description

Test Data

Expected Result

Actual Result

Pass/Fail

1

Give input in normal range

12345, hello, 5

5 randomly generated passwords of length 10

5 randomly generated passwords of length 10

pass

Functional Coverage Tests

Test #

Test Description

Test Data

Expected Result

Actual Result

Pass/Fail

1

Test that generating 10 passwords works correctly

123, hi, 10

10 randomly generated passwords of length 5

10 randomly generated passwords of length 5

Pass

Boundary Values Tests

Test #

Test Description

Test Data

Expected Result

Actual Result

Pass/Fail

1

Test a 1 digit integer

1, hello, 5

5 randomly generated passwords of length 6

5 randomly generated passwords of length 6

Pass

Special Values Tests

Test #

Test Description

Test Data

Expected Result

Actual Result

Pass/Fail

1

Test generation of 0 passwords

12345, hello, 0

Program will end without printing anything

Program will end without printing anything

Pass

And finally this is the function main.cpp that they gave us as well:

main.cpp:

#include  #include  #include  #include  #include  using namespace std; int main() { int numPasswords = 0; int randNum = 0; int originalLength = 0; int month = 0; int day = 0; char trash = ' '; char firstLetter = ' '; string inputInt = ""; string inputString = ""; string allInput = ""; string tmpInput = ""; string password = ""; string lastName = ""; cout << "Please enter your last name" << endl; cin >> lastName; cout << "Please enter the month and day i.e.(1/25)" << endl; cin >> month >> trash >> day; firstLetter = lastName[0]; if((firstLetter > 64 && firstLetter < 78) || (firstLetter > 96 && firstLetter < 110)) { if(day > 14 && day < 21) cout << "Date Verified" << endl; else { cout << "Error: Names that begin with A-M register between the 15th and the 20th!" << endl; return 1; } } else if((firstLetter > 77 && firstLetter < 91) || (firstLetter > 108 && firstLetter < 123)) { if(day > 19 && day < 26) cout << "Date Verified" << endl; else { cout << "Error: Names that begin with N-Z register between the 20th and the 25th!" << endl; return 1; } } else { cout << "Invalid last name!" << endl; return 1; } cout << "Please enter a multi-digit integer" << endl; cin >> inputInt; cout << "Please enter a string" << endl; cin >> inputString; cout << "How many passwords would you like to generate?" << endl; cin >> numPasswords; cout << " "; allInput = inputInt + inputString; tmpInput = inputInt + inputString; srand (time(NULL)); for(int i = 0; i < numPasswords; i++) { originalLength = tmpInput.length(); for (int j = 0; j < originalLength; j++) { randNum = rand() % tmpInput.length(); password += tmpInput[randNum]; tmpInput.erase (tmpInput.begin()+randNum); } cout << "Password " << i << ":\t" << password << endl; password = ""; tmpInput = allInput; } return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions

Question

2. Outline the functions of nonverbal communication

Answered: 1 week ago