to assess the student’s ability to provide

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.1: Assignment Operations
Problem 6E: (Numerical) Write an assignment statement to calculate the nth term in an arithmetic sequence. This...
icon
Related questions
Question
100%

I'm asking for help with different perspectives on purpose. Also, you do not have to complete the code, I’m posting the entire question in order for the question to be clear. Sorry if you see this question ask more than once.

 

Objectives: 

The main objective of this assignment is to assess the student’s ability to provide a complete Black-Box testing plan for a computer program

 

Description: 

you will need to design a complete Black-Box testing plan for the following program. Instead of changing passwords every semester, students will now change passwords once a month. Unfortunately, the school has realized that many students are bad at picking their passwords. Ideally, passwords alternate between letters, numbers, and symbols. However, most students and faculty pick passwords such as “12345password”. To make matters worse, when students and faculty are forced to change their password, usually only a single character is added to the end of their previous password. Due to this problem, the University has created a program to help students and faculty create strong, new passwords. Although the program has been created, it has not been tested. You are tasked with created a complete Black-Box testing plan for the program. 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. 

 

** I have access to “passwordgeneration.cbp,.depend, and .layout…. however I cannot access it at the moment. let me know if this would help. 

 

- main.cpp attached 

-solution template attached

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string>
using namespace std;
int main()
{
int numPasswords = 0;
int randNum = 0;
int originalLength
int month = 0;
int day = 0;
char trash =
= 0;
';
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;
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
password = "";
tmpInput = allInput;
}
Second Half of main.cpp
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
{
if (day > 19 && day < 26)
cout << "Date Verified" << endl;
<« i « ":\t" << password << endl;
%3D
firstLetter < 123))
return 0;
}
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 << "\n\n";
allInput = inputInt + inputString;
tmpInput = inputInt + inputString;
%3D
Transcribed Image Text:#include <iostream> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string> using namespace std; int main() { int numPasswords = 0; int randNum = 0; int originalLength int month = 0; int day = 0; char trash = = 0; '; 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; 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 password = ""; tmpInput = allInput; } Second Half of main.cpp 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 { if (day > 19 && day < 26) cout << "Date Verified" << endl; <« i « ":\t" << password << endl; %3D firstLetter < 123)) return 0; } 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 << "\n\n"; allInput = inputInt + inputString; tmpInput = inputInt + inputString; %3D
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
Give input in
normal range
5 randomly
generated
passwords of length passwords of length
1
12345, hello, 5
5 randomly
pass
generated
10
10
Functional Coverage Tests
Test #
Test Description
Test Data
Expected Result
Actual Result
Pass/Fail
Test that generating
123, hi, 10
10 randomly
generated passwords generated passwords
of length 5
1
10 randomly
Pass
10 passwords
works correctly
of length 5
Des
Boundary Values Tests
Test #
Test Description
Test Data
Expected Result
Actual Result
Pass/Fail
Rec
Test a 1 digit
1, hello, 5
5 randomly
5 randomly
generated passwords generated passwords
of length 6
1
Pass
Cre
integer
of length 6
Tea
Special Values Tests
Tutc
Test #
Test Description
Test Data
Expected Result
Actual Result
Pass/Fail
My
Program will end
without printing
anything
12345, hello, 0
Test generation of 0
passwords
Program will end
without printing
anything
1
Pass
Stuc
Tool
Transcribed Image Text: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 Give input in normal range 5 randomly generated passwords of length passwords of length 1 12345, hello, 5 5 randomly pass generated 10 10 Functional Coverage Tests Test # Test Description Test Data Expected Result Actual Result Pass/Fail Test that generating 123, hi, 10 10 randomly generated passwords generated passwords of length 5 1 10 randomly Pass 10 passwords works correctly of length 5 Des Boundary Values Tests Test # Test Description Test Data Expected Result Actual Result Pass/Fail Rec Test a 1 digit 1, hello, 5 5 randomly 5 randomly generated passwords generated passwords of length 6 1 Pass Cre integer of length 6 Tea Special Values Tests Tutc Test # Test Description Test Data Expected Result Actual Result Pass/Fail My Program will end without printing anything 12345, hello, 0 Test generation of 0 passwords Program will end without printing anything 1 Pass Stuc Tool
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Module hierarchy chart
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++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT