Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 7 : Consider the following mathematical theory: For all a , b > 0 , the following is true: a + b > a

Q7: Consider the following mathematical theory: For all a, b >0, the following is true: a + b > a
and a + b > b. This statement holds for every element (or combination of elements) set. Using
JUnit Theories:
1. Write a testing program to check the truth of this mathematical statement for every pair
(every possible combination) of a and b from the value set val={1,2,307,400567}.
2. Add another theory to be covered in your testing program in which the commutative feature
of every possible pair of the integers a and b should be true: a + b = b + a. Use the same
value set val as in Task 1 for this statement as well.
3. Consider a new value set newval={0,-1,-10,-1234,1,10,6789} as your data points
for input values in your testing program for every possible pair of a and b. What will be your
results, and why? Demonstrate and justify your achieved results.
4. Considering the value set newval, rectify your previous testing program using Assumption
to be able to check the truth of the aforementioned mathematical theories over every possible
pair of a and b from the value set newval.
5. Consider another value set:
1{0,-1,-10,-1234,1,10,6789, Integer.MAX_VALUE, Integer.MIN_VALUE}
as your data points for input values in your testing program for every possible pair of a and
b. What will be your results, and why? Demonstrate and justify your achieved results.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions