Computer Science, asked by gmudreac, 5 months ago

Demonstrate how to write each condition as an if-else in Java. If yes, then the computer should print “The answer is A,” “The answer is B,” or “The answer is C.” Otherwise, the computer should print “The answer is not here.”

Answers

Answered by crystal35
1

Question #2)

In an Examination, a candidate has to score a minimum of 24 marks in order to clear the exam. The maximum that he can score is 40 marks.  Identify the Valid Equivalence values if the student clears the exam.

a)    22,23,26

b)    21,39,40

c)    29,30,31

d)    0,15,22

Solution:

The classes will be as follows:

Class I: values < 24   => invalid class

Class II: 24 to 40       => valid class

Class III: values > 40 => invalid class

We have to identify Valid Equivalence values. Valid Equivalence values will be there in a Valid Equivalence class. All the values should be in Class II. So the answer is ‘C’

What is Equivalence Partitioning?

Equivalence Partitioning is a method for deriving test cases. In this method, equivalence classes (for input values) are identified such that each member of the class causes the same kind of processing and output to occur.

The values at the extremes (start/end values or lower/upper-end values) of such class are known as Boundary values. Analyzing the behavior of a system using such values is called Boundary Value Analysis (BVA).

Here are few sample questions for practice from ISTQB exam papers on Equivalence Partitioning and BVA. (Ordered: Simple to little complex)

Question #1)

One of the fields on a form contains a text box that accepts numeric values in the range of 18 to 25. Identify the invalid Equivalence class.

a)    17

b)    19

c)    24

d)    21

Solution:

The text box accepts numeric values in the range 18 to 25 (18 and 25 are also part of the class). So this class becomes our valid class. But the question is to identify invalid equivalence class. The classes will be as follows:

Class I: values < 18   => invalid class

Class II: 18 to 25       => valid class

Class III: values > 25 => invalid class

17 fall under an invalid class. 19, 24 and 21 falls under valid class. So the answer is ‘A’

HOPE it helps you and mark me as a braienlist and follow me

Similar questions