Assignment #3 Turn in your work as a single Word or PDF fi
Assignment #3 Turn in your work as a single Word or PDF file. Problem 1 Problem 2 Problem 3 Total 1.1 1.2 1.3 2.1 2.2 2.3 2.4 3.1 3.2 30 pts 5 pts 5 pts 20 pts 20 pts 5 pts 5 pts 5 pts 5 pts 100 pts This assignment is based on the given Java code in TriangleSidesAssignment.zip. The source code has 10 packages: correct, mutant1, mutant 2, …, and mutant 9. TriangleSides.java in the “correct” package is the original correct version. The reportTriangleType method in TriangleSides.java reports the type (EQUILATERAL, SCALENE, ISOSCELES and NOTRIANGLE) of a triangle, given the lengths of three integer sides a, b, and c. TriangleSides.java in each mutantX (X=1, …, 9) package is a mutant of the original version, where the reportTriangleType method is modified. The modifications are summarized below. mutantX Original Mutated version 1 if (a<b+c && b<a+c && c<b+a){ if (b<a+c && c<b+a){ 2 if (a==b && b==c) if (b==c) 3 if (a==b || b==c || c==a) if (a==b || c==a) 4 return TriangleType. SCALENE; return TriangleType.ISOSCELES; 5 if (a<b+c && b<a+c && c<b+a){} else return TriangleType.NOTRIANGLE; if-else removed 6 if (a==b || b==c || c==a) if (a==b || b<=c || c==a) 7 if (a<b+c && b<a+c && c<b+a){ if (a<b+c && b<=a+c && c<b+a){ 8 if (a<=0 || b<=0 || c<=0) if (a<=0 && b<=0 && c<=0) 9 if (a<=0 || b<=0 || c<=0) return TriangleType.NOTRIANGLE; // if (a<=0 || b<=0 || c0 AND b>0 AND c>0) On failure: return “NOTRIANGLE” (2) Validated: (a+b>c AND a+c>b AND b+c>a) On failure: return “NOTRIANGLE” Postconditions (3) IF (a=b AND b=c) THEN return “EQUILATERAL” (4) IF ((a=b AND b¹c) OR (a=c AND b¹c) OR (b=c AND b¹a)) THEN return “ISOSCELES” (5) IF (a¹b AND b¹c AND a¹c) THEN return “SCALENE” a b c a=b b=c a=c a+b>c b+c>a a+c >b Non-errorrequirements Errorrequirements Test Case ID Test input Expected result Test requirements in (2.1) satisfied by the test a b c Non-error requirements Error requirements 1 2 … Provide the source code of your TriangleSpecficationTest.java and a screenshot of your test execution result. (5 points) Note: To get full credits for Problems 2.1 and 2.2, your tests must be able to kill at least 5 mutants. mutantX Test failure: Yes or No? If Yes, list the tests that failed; If No, explain why there is no failure according to the fault detection condition in Problem 1.1 1 2 3 4 5 6 7 8 9 Test Case ID Test Input Expected Result a b c 1 4 1 2 Not a triangle 2 1 4 2 Not a triangle 3 1 2 4 Not a triangle 4 5 5 5 Equilateral 5 ? ? ? Impossible 6 ? ? ? Impossible 7 2 2 3 Isosceles 8 ? ? ? Impossible 9 2 3 2 Isosceles 10 3 2 2 Isosceles 11 3 4 5 Scalene Provide the source code of your TriangleDecisionTableTest.java and a screenshot of your test execution result. (5 points) mutantX Test failure: Yes or No? If Yes, list the tests that failed; If No, explain why there is no failure according to the fault detection condition in Problem 1.1 1 2 3 4 5 6 7 8 9
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
