Question

Please answer the four questions below. 1. If you were going to test a method that...

Please answer the four questions below.

1. If you were going to test a method that has one integer input (parameter), which of the following would be a reasonable set of equivalence classes?

A. x < 0; x == 0; x > 0

B. x < 0; x > 0

C. 0 < x < 7; x >= 7

D. -15, 0, 25

2. If we are testing a program that has one input (parameter), a real number, which of following is a reasonable set of equivalence classes?

A. x > 0; x == 0, x < 0

B. x < 0.0, x > 0.0

C. x < -1000000.0, -1000000.0 <= x < 0.0, x == 0.0, 0 < x <= 1000000.0, x > 1000000.0

D. x < -1123, x > 7893

3. If we are testing a program that has one input (parameter), a real number, and we have chosen the following set of equivalence classes, which set of test inputs is a minimum for this equivalence class?
x < 0.0, x == 0.0, x > 0.0

A. -12, 0, 12

B. -123, 123

C. -123.00, 123.00

D. -789.34, 0.0, 123456.789

4. If you were testing a method called Adult that takes one integer parameter for age, and determines if this person is legally an adult (age 18 or older), what set of equivalence classes would be most appropriate?

A. age < 0, age == 0, age > 0

B. age < 18, age >= 18

C. age < 0 [ for errors], 0 < age < 18, age >= 18

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Equivalent Class Partitioning is a black box technique (code is not visible to tester) which can be applied to all levels of testing like unit, integration, system, etc. In this technique, you divide the set of test condition into a partition that can be considered the same.

It divides the input data of software into different equivalence data classes.

You can apply this technique, where there is a range in the input field.

1. If you were going to test a method that has one integer input (parameter), which of the following would be a reasonable set of equivalence classes?

A. x < 0; x == 0; x > 0

Since here we can cover positive integer values, negative integer values and zero.

2. If we are testing a program that has one input (parameter), a real number, which of following is a reasonable set of equivalence classes?

A. x > 0; x == 0, x < 0

Here also all real numbers are covered.

3. If we are testing a program that has one input (parameter), a real number, and we have chosen the following set of equivalence classes, which set of test inputs is a minimum for this equivalence class?

D. -789.34, 0.0, 123456.789

A positive real value, negative real number and 0 are covered here.

4. If you were testing a method called Adult that takes one integer parameter for age, and determines if this person is legally an adult (age 18 or older), what set of equivalence classes would be most appropriate?

C. age < 0 [ for errors], 0 < age < 18, age >= 18

Unsuccessful case of negative numbers also should be considered.

Add a comment
Know the answer?
Add Answer to:
Please answer the four questions below. 1. If you were going to test a method that...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • java language please. thank you T-Mobile 9:00 AM For this assignment, create a Java class named...

    java language please. thank you T-Mobile 9:00 AM For this assignment, create a Java class named "MyRectangle3d" Your class must have the following attributes or variables · x (the x coordinate of the rectangle, an integer) * y (the y coordinate of the rectangle, an integer) * length (the length of the rectangle, an integer) * width (the width of the rectangle, an integer) * height (the height of the rectangle, an integer) * color( the color of the rectangle,...

  • Look at this partial class definition, and then answer questions a - b below: Class Book...

    Look at this partial class definition, and then answer questions a - b below: Class Book    Private String title    Private String author    Private String publisher    Private Integer copiesSold End Class Write a constructor for this class. The constructor should accept an argument for each of the fields. Write accessor and mutator methods for each field. Look at the following pseudocode class definitions: Class Plant    Public Module message()       Display "I'm a plant."    End Module...

  • Can I please get an answer to this problem? 3. Suppose we would like to estimate...

    Can I please get an answer to this problem? 3. Suppose we would like to estimate the effect of city credit ratinglon the municipal bond interest rate mbr. Other factors affecting mbr are tax rate tr, unemployment rate ue, and the ratio of citizens in working age to total population of the city watp. Credit rate classes are indicated as B, BB, BBB, A, AA, AAA, with B the lowest and AAA the highest. a) Define appropriate dummy variables for...

  • I need java code for the following problem. Lab 7: Methods 1. Write a Java program called Numbers that calls the following methods and displays the returned value: Write a method called cubelt that a...

    I need java code for the following problem. Lab 7: Methods 1. Write a Java program called Numbers that calls the following methods and displays the returned value: Write a method called cubelt that accepts one integer parameter and returns the value raised to the third power as an integer. o Write a method called randominRange that accepts two integer parameters representing a range. The method returns a random integer in the specified range inclusive. 2. o Write a method...

  • Could you please help me on these 5 questions? Thank you! Find the exact value of...

    Could you please help me on these 5 questions? Thank you! Find the exact value of the following expression in degrees without using a calculator or table. -19 -190 We were unable to transcribe this imageFind all angles (in degrees) that satisfy the following equation. sin a = 1 Select the correct choice below and, if necessary, fill in the answer boxes to com 1}. where k is any integer. O A. The solution set is {a la = °...

  • Can I get some help with these questions please,thank you The marital status distribution of the...

    Can I get some help with these questions please,thank you The marital status distribution of the U.S. male population, age 15 and older, is as shown below. Marital Status Percent never married 31.3 married 56.1 widowed 2.5 divorced/separated 10.1 Suppose that a random sample of 400 U.S. young adult males, 18 to 24 years old, yielded the following frequency distribution. We are interested in whether this age group of males fits the distribution of the U.S. adult population at the...

  • We have a dataset that has real-valued labels and one feature. The dataset contains three training examples. (ro is the intercept.) 10.40.21 1 0.80.86 1-1.20.35 In all calculation below. keep four de...

    We have a dataset that has real-valued labels and one feature. The dataset contains three training examples. (ro is the intercept.) 10.40.21 1 0.80.86 1-1.20.35 In all calculation below. keep four decimal digits for all intermediate results and use those Part 1: Stochastic Gradient Descent (12%) Perform linear regression with stochastic gradient descent algorithm for three iterations and rounded results for next-step calculation. fill in the blanks in the following tables. The hypothesis i For simplicity, let's process the three...

  • Can you #2 and #3? 6. LESSON 6 (1) Let A be the set of people alive on earth. For each relation defined below, determin...

    Can you #2 and #3? 6. LESSON 6 (1) Let A be the set of people alive on earth. For each relation defined below, determine if it is an equivalence relation on A. If it is, describe the equivalence classes. If it is not determine which properties of an equivalence relation fail. (a) a Hb a and b are the same age in (in years). (b) a Gb a and b have grandparent in common. 2) Consider the relation S(x,y):x...

  • [15 marks] Suppose that students enrolled in one course are required to take four tests, and...

    [15 marks] Suppose that students enrolled in one course are required to take four tests, and each student’s final grade for this course is the average of his/her grades of these four tests. This question asks you to write a program that can be used to compute the lowest final grade, highest final grade and the average final grade. General Requirements: Use a5q1.c as the name of your C source code file. We will use the following command on bluenose...

  • For questions 16-18, what are the equivalence classes. Pls say how many eqivalence classes are fo...

    For questions 16-18, what are the equivalence classes. Pls say how many eqivalence classes are for each. Thank you in advance, but completed with in the hour would be greatly apreciated bc I have an exam, and I will obviously like any completed work. Hope you all have a great day! Example. Let R-{(a, b) E Z x Ζ : lal-lol}, for era mple: 2R-2) and 4R4 but 43. We see that R is an equivalence relation on Z. First,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT