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
  • 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
  • Satisfactory Essays

    Testing

    • 471 Words
    • 2 Pages

    This course provides a systematic treatment of the fundamentals of the theory and practice of Finance. The course will consist of lectures, case studies, and reviews of homework. It is designed to provide students with a broad, systematic view of finance in the corporate context. By the end of the class, successful students will be able to analyze firm performance, value financial assets, determine the cost of capital, evaluate capital structure and dividend policies, and know the basics of raising capital in order to make informed investment and financing decisions. Topic areas will include financial performance measurement, valuation, capital budgeting, capital market theory, basics of investments, cost of capital, raising capital, and capital structure and dividends.…

    • 471 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

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

    • 431 Words
    • 2 Pages
    Good Essays
  • Good Essays

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

    • 675 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Testing

    • 1293 Words
    • 6 Pages

    While working in the Financial Aid field I have had the privilege of working with a number of different individuals of diverse backgrounds. I have come across people from all walks of life, including those with severe disabilities, individuals with limited resources, and even individuals with different cultural and ethical backgrounds. Each encounter has been unique in its own way with learning experiences that I have carried with me through my years of employment. Additionally when growing up I grew up in a very diverse area and have had personal experiences with working with people of various ethnicities, social, economical and physical backgrounds. Through the years I have learned to never judge a book by its cover and have learned that working with different types of people may have its challenges at times, but it is never impossible to work with different types of people regardless of their backgrounds. With my life experiences, both professionally and personally, working with such a broad range of individuals has assisted me in growing professionally and has shown me that I have the ability to work with just about anyone I come in contact with. As with anything in life, the effort and understanding that you apply to the situation is what you will get out of it. slfjsdfjlfjsldfjdlfkjas fj jfakfjfjaffjalkfj afjaflajfajfajfalsfjalfka kldfjafj akdfjafj;af ljdfafl;ajfWhile working in the Financial Aid field I have had the privilege of working with a number of different individuals of diverse backgrounds. I have come across people from all walks of life, including those with severe disabilities, individuals with limited resources, and even individuals with different cultural and ethical backgrounds. Each encounter has been unique in its own way with learning experiences that I have carried with me through my years of employment. Additionally when growing up I grew up in a very diverse area and have had personal experiences with working with people of various…

    • 1293 Words
    • 6 Pages
    Satisfactory 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
  • Powerful Essays

    Test Writing

    • 3500 Words
    • 14 Pages

    Copyright ©2010 by the Commonwealth of Virginia, Department of Education, P.O. Box 2120, Richmond, Virginia 23218-2120. All rights reserved. Except as permitted by law, this material may not be reproduced or used in any form or by any means, electronic or mechanical, including photocopying or recording, or by any information storage or retrieval system, without written permission from the copyright owner. Commonwealth of Virginia public school educators may reproduce any portion of these released tests for non-commercial educational purposes without requesting permission. All others should direct their written requests to the Virginia Department of Education, Division of Student Assessment and School Improvement, at the above address or by e-mail to Student_Assessment@doe.virginia.gov.…

    • 3500 Words
    • 14 Pages
    Powerful 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
  • 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