Files 3 2021 December NotesHubDocument 1640176508
Files 3 2021 December NotesHubDocument 1640176508
#include<iostream>
using namespace std;
int main()
{
int a,b,c,d;
d = (b*b)- (4*a*c);
else if(d>0)
cout<<"Real Roots"<<endl;
return 0;
}
OUTPUTS:
SOURCE CODE:
#include<iostream>
using namespace std;
int main()
{
if((side1<1)||(side2<1)||( side3<1)||(side1>100)||(side2>100)||(side3>100))
cout<<"Out of domain Input"<<endl;
else if ((side1 + side2 > side3 && side1 + side3 > side2 && side2 + side3 > side1) && (side1 >
0 && side2 > 0 && side3 > 0))
{
if (side1 == side2 && side2 == side3)
cout<<"Equilateral Triangle"<<endl;
else if (side1 == side2 || side2 == side3 || side1 == side3)
cout<<"Isosceles Triangle"<<endl;
else
cout<<"Scalene Triangle"<<endl;
}
else {
cout<<"Triangle not possible"<<endl;
}
return 0;
}
OUTPUTS:
SOURCE CODE:
#include<iostream>
using namespace std;
int main()
{
double a,b,c,a1,a2,a3;
int valid = 0;
cout<<"Enter first angle of the triangle: ";
cin>>a;
cout<<"Enter second angle of the triangle: ";
cin>>b;
cout<<"Enter third angle of the triangle: ";
cin>>c;
if(a>0 && a<=100 && b>0 && b<=100 && c>0 && c<=100)
{
if((a+b) > c && (b+c) > a && (a+c) >b)
valid = 1;
else
valid = -1;
}
if(valid==1) {
a1 = (a*a + b*b)/(c*c);
a2 = (b*b + c*c)/(a*a);
a3 = (c*c + a*a)/(b*b);
#include<bits/stdc++.h>
using namespace std;
static int balance=1000;
bool isAlphaNum(string s)
{
for(int i=0;i<s.size();i++)
{
if(!((s[i]>='A' && s[i]<='Z') || (s[i]>='a' && s[i]<='z') && (s[i]>='0' && s[i]<='9' )))
{
return false;
}
}
return true;
}
void withdraw()
{
int amnt;
cout<<"Enter amount to be withdrawn: "<<endl;
cin>>amnt;
if(balance<amnt)
{
cout<<"Not Enough balance!"<<endl;
}
else
{
balance -= amnt;
cout<<"Withdrawn Successfully"<<endl;
}
}
void check()
{
cout<<"Current Balance= "<<balance<<endl;
}
void deposit()
{
int dep;
cout<<"Enter amount to be deposited: "<<endl;
cin>>dep;
if(dep>=0)
{
balance += dep;
cout<<"Amount deposited Successfully"<<endl;
}
else
{
cout<<"Enter positive amount"<<endl;
}
}
int main()
{
string alphapass="";
string areacode;
cout<<"Enter Area Code: "<<endl;
getline(cin, areacode);
if(!(areacode.length()==0 || (areacode.length()==3)))
{
cout<<"Invalid Area Code"<<endl;
}
string pre;
cout<<"Enter 3 digit Prefix: "<<endl;
getline(cin,pre);
string suffix;
cout<<"Enter 4 digit Suffix: "<<endl;
getline(cin, suffix);
if(suffix.length()!=4)
{
cout<<"Invalid Suffix"<<endl;
}
if(alphapass.length()!=6)
{
cout<<"Invalid Password"<<endl;
}
else if(!(isAlphaNum(alphapass)))
{
cout<<"Password not alphanumeric"<<endl;
}
char ch='y';
while(ch=='y'||ch=='Y')
{
int command;
cout<<"Select Command : \n1.Check Status\n2.Deposit\n3.Withdraw"<<endl;
cin>>command;
switch(command)
{
case 1: check();
break;
case 2: deposit();
break;
case 3: withdraw();
break;
default: cout<<"Choice not Available"<<endl;
}
cout<<"Do you wish to continue? (y/n):";
cin>>ch;
}
}
OUTPUTS:
WINRUNNER:
SELENIUM:
QA COMPLETE:
SCREENSHOTS OF TEST SCENARIOS
Test Case ID: 4 Test Case ID: 5 Test Case ID: 8 & 11
Test Case ID: 12 & 13 Test Case ID: 14 Test Case ID: 14