Preview

software testing

Good Essays
Open Document
Open Document
396 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
software testing
PRACTICAL-1

Write a program in C/C++ to find the roots of a quadratic equation and perform the following on it: Boundary Value Analysis (BVA).

#include
#include
void main()
{
int a,b,c; int d=0; clrscr(); printf("The Quadratic Equation is of type ax2+bx+c=0"); printf("Enter value of a,b,c:"); scanf("%d \n %d \n %d",&a,&b,&c); d=((b*b)-(4*a*c)); if(a100)
{
printf("Invalid input");
}
if(d==0)
{
printf("Real and Equal Roots");
}
else if(d>0)
{
printf("Real roots");
}
else
{
printf("Not a quadratic equation");
}
getch();
}

Boundary Value Test Cases
In the above program, we consider the values as 0 (Minimum), 1 (Just above Minimum), 50
(Nominal), 99 (Just below Maximum) and 100 (Maximum)

Test
Case
ID

a

b

c

Expected Output

1

50

50

0

Real Roots

2

50

50

1

Real Roots

3

50

50

50

Imaginary Roots

4

50

50

99

Imaginary Roots

5

50

50

100

Imaginary Roots

6

50

0

50

Imaginary Roots

7

50

1

50

Imaginary Roots

8

50

99

50

Imaginary Roots

9

50

100

50

Equal Roots

10

0

50

50

Not a Quadratic
Equation

11

1

50

50

Real Roots

12

99

50

50

Imaginary Roots

13

100

50

50

Imaginary Roots

OUTPUT

PRACTICAL-2

Write a program in C/C++ to find the area of a circle, triangle, square and rectangle and perform the following: Equivalence Class testing.

#include
#include
void main()
{
int base=0,ht=0,a,rad,l,b; float cirar=0,triar=0; int rectar=0,sqar=0; int ch; clrscr(); do{ clrscr(); printf("\n 1. Area of triangle \n"); printf("2. Area of square \n"); printf("3. Area of circle\n"); printf("4. Area of rectangle \n"); printf("5. Exit\n"); printf("Enter choice:\n"); scanf("%d",&ch ); switch(ch) { case 1: clrscr(); printf("\n***Area of Triangle***"); a:printf("\nEnter base and height of triangle(1-200):"); scanf("%d \n

You May Also Find These Documents Helpful

  • Satisfactory Essays

    a. Write a C++ function named fracpart() that returns the fractional part of any number…

    • 720 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    EIC and Tax Tables

    • 13897 Words
    • 56 Pages

    $1 50 100 150 200 250 300 350 400 450 500 550 600 650 700 750 800 850 900 950 1,000 1,050 1,100 1,150 1,200 1,250 1,300 1,350 1,400 1,450 1,500 1,550 1,600 1,650 1,700 1,750 1,800 1,850 1,900 1,950 2,000 2,050 2,100 2,150 2,200 2,250 2,300 2,350 2,400 2,450…

    • 13897 Words
    • 56 Pages
    Satisfactory Essays
  • Satisfactory Essays

    5. Refers to scanning a system for vulnerabilities and reveals information about the target that is needed to access it.…

    • 263 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Show all of your calculations and processes. Describe your answer for each question in complete sentences, whenever it is necessary.…

    • 831 Words
    • 5 Pages
    Good Essays
  • Good Essays

    Coupling metrics: It provides an indication of the "connectedness" of a module to other modules…

    • 431 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Math Stuff

    • 1421 Words
    • 8 Pages

    This is a written question, worth 10 points. DO NOT place the problem code on the answer sheet. A proctor will fill this out after exam submission. Show all steps (work) on your answer sheet for full credit.…

    • 1421 Words
    • 8 Pages
    Satisfactory Essays
  • Good Essays

    o Discuss how and why this is important for managers to know, and explain what…

    • 675 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    testing

    • 1193 Words
    • 11 Pages

    Along with their daily workload, interns will also meet as a group to participate in weekend…

    • 1193 Words
    • 11 Pages
    Powerful Essays
  • Powerful Essays

    Software Engineering

    • 2867 Words
    • 12 Pages

    Any coherent and reasonable project must have some requirements that define what that project is supposed to do. The requirements are the basic steps in implementing a project. A requirement is an objective that must be met. There are several types of requirements such as price, performance and reliability objectives. Requirements are instructions describing what functions the project is supposed to provide, what characteristics the project is supposed to have, and what goals the project is supposed to meet. The shortage of requirements causes many problems in starting and implementing a project. This law states that this shortage of requirements is the main source in the failure of the project.…

    • 2867 Words
    • 12 Pages
    Powerful Essays
  • Good Essays

    Grade 10 Math Exam Prep

    • 786 Words
    • 4 Pages

    Solve the system of equations below algebraically and verify your answer . (show a check).…

    • 786 Words
    • 4 Pages
    Good Essays
  • Good Essays

    C++ Midterm

    • 2831 Words
    • 12 Pages

    What is the value inside the "value" variable at the end of the given code snippet?…

    • 2831 Words
    • 12 Pages
    Good Essays
  • Good Essays

    Software Engineering

    • 985 Words
    • 4 Pages

    I have many goals in mind for my life. I want to graduate university, possibly go to graduate school, and obtain a career in which I am happy and satisfied. Yes, I know this sounds very cliché as many people want to obtain this kind of life. I don’t mind obtaining a “normal” happy life as long as I am happy with it. I am familiar with Maslow’s Hierarchy of Needs and I want to make sure I fulfill my lower needs before I start trying to achieve my goals. I have never actually applied the GIOADA process to my decision making in the past. After reading the document that describes the GIOADA process, I will start applying this process to future decisions I make in life. Also, as I look back at some of the big decisions I made previously, I wish I applied the GIOADA process in making these decisions. That would have allowed me to more strongly analyze all the processes of the decision making.…

    • 985 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    completing the square

    • 592 Words
    • 3 Pages

    Note: If you don't know about complex numbers yet, then you have to stop at this step, because a square can't equal a negative number! Otherwise, proceed...…

    • 592 Words
    • 3 Pages
    Satisfactory Essays
  • Better Essays

    Solving Quadratic Equations

    • 2966 Words
    • 12 Pages

    While the ultimate goal is the same, to determine the value(s) that hold true for the equation, solving quadratic equations requires much more than simply isolating the variable, as is required in solving linear equations. This piece will outline the different types of quadratic equations, strategies for solving each type, as well as other methods of solutions such as Completing the Square and using the Quadratic Formula. Knowledge of factoring perfect square trinomials and simplifying radical expression are needed for this piece. Let’s take a look!…

    • 2966 Words
    • 12 Pages
    Better Essays
  • Satisfactory Essays

    Assessment for Software

    • 709 Words
    • 3 Pages

    The use of technology to assess student learning has proven useful which has expanded its use in all learining enviroments. Technology has improved education so vastly that some schools are fully online while others mix campus classes with the virtual setting. This has created a steady growth of innovative software being used to assist teachers and stydents within those settings. Some of the software have becoe essential to education. Applying them in consistent manner helps the student build their foundation for life in our technology driven society. The advent of countless wireless devices has elevated our knowledge base and software has elevated as well. Even though some technologies and softwares are exspensive or require added training, the pros outweigh the cons in terms of benefits.…

    • 709 Words
    • 3 Pages
    Satisfactory Essays