Part 2 - Black Box Testing A customer has requested a program be developed to me
ID: 3627568 • Letter: P
Question
Part 2 - Black Box Testing
A customer has requested a program be developed to meet the following criterion:
1. The program needs to convert from Celsius temperatures to Fahrenheit temperatures.
2. The user should be able to enter temperatures containing fractional degrees (ie. 12.3)
3. The converted temperatures should be accurate to within 1/10th of a degree.
4. The user should be able to enter the number of temperatures to be converted up to a maximum of 10.
5. The output should be tabular with each row including the input and converted temperature.
Write a test plan to thoroughly test this program. The executable for this program is included in with this lab. You should have test cases which verify that the program does all of what is required in the problem specification above. You should also test to see how robust the program is, that is, how it handles inputs outside the expected ranges.
Document your test plan in a table. For each test case, document the expected program behavior and the actual program behavior. If the program does not behave according to your prediction, write a brief explanation of what the program did wrong.
For Part 1, answer all the questions, including filling in all the tables. For Part 2, write a test plan, documenting each test case including predicted and actual results along with explanations.
Explanation / Answer
please rate - thanks
#include<iostream>
#include <iomanip>
using namespace std;
int main()
{int i,num;
double cel[10],fah[10];
cout<<"How many temperatures to convert(max 10)? ";
cin>>num;
while(num<1||num>10)
{cout<<"invalid entry ";
cout<<"How many temperatures to convert(max 10)? ";
cin>>num;
}
for(i=1;i<=num;i++)
{cout<<"Enter celsius temperature "<<i<<": ";
cin>>cel[i-1];
}
cout<<" Celsius Fahrenheit ";
for(i=0;i<num;i++)
cout<<setprecision(1)<<fixed<<cel[i]<<" "<<setprecision(1)<<fixed<<
9./5.*cel[i]+32.<<" ";
cout<<endl;
system("pause");
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.