Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Just filling in the chart for black box testing. Main.cpp #include #include #include #include #include using namespace std; int main() { int numPasswords = 0;
Just filling in the chart for black box testing.
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
cin >> lastName;
cout
cin >> month >> trash >> day;
firstLetter = lastName[0];
if((firstLetter > 64 && firstLetter 96 && firstLetter
{
if(day > 14 && day
cout
else
{
cout
return 1;
}
}
else if((firstLetter > 77 && firstLetter 108 && firstLetter
{
if(day > 19 && day
cout
else
{
cout
return 1;
}
}
else
{
cout
return 1;
}
cout
cin >> inputInt;
cout
cin >> inputString;
cout
cin >> numPasswords;
cout
allInput = inputInt + inputString;
tmpInput = inputInt + inputString;
srand (time(NULL));
for(int i = 0; i
{
originalLength = tmpInput.length();
for (int j = 0; j
{
randNum = rand() % tmpInput.length();
password += tmpInput[randNum];
tmpInput.erase (tmpInput.begin()+randNum);
}
cout
AT&T 2:44 PM 36% . Assignment3.pdf Assignment3.pdf Assignment #3 Prolem Solving and Progranmin in C++ Department of Computer Sclenc ld Dominion Eniversity Obiectivess The main objective o this assignment is to assess the student's abilny soprovide a complete Black-Box testing plan foe a computer program Description: In this assignment you will need to design a complete Black-Box testing plan for the following program At Old Dominion University, students and faculty are forcod to chang their passwords every semester. This process is noeded to ensure that all university proliles are secure. ODU would bke to modity this process to create a more secure environment Instead of changing passwords every semester, si dents will now change passwords ?? ortunaely, the school has realized that many students are bad at picking their passwonds Ideally, passwoeds altermate between letters, numbers, and symbels. However, most students and faculty pick passwords such as 1234Spasswond". To make matters wonse, when students and faculty are forced to change their password usally only a single character is added to the end of their previous password. Due to this peoblem, the University has created a program to help students and faculty crealle strong, new passwords. Although the program has beon crcated, it has not becn tested. You are tasked with created a complctc Black-Box testing plan for the peogram The password gencration program is somewhat simple. First, the user willl entertheir last name. In this peogram, students that have last names beginning with A-M will change their passwords between the 15 and the 20 of every month. Students that have last names beginning with N-Z will change their passwords between the 20 and the 25 of every month Next the user will ingut a multi-digit integer. Aflerwards, the user will input a string Lastly the ser will select how many passwords they would like to generate with this information The programhen uses this information to randomly gencrate passweeds using this data The program will not escoute if the current date is not cerect. Using this infoemation 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 esk ist password = "";
tmpInput = allInput;
}
return 0;
}
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