Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Suppose that we have a class with some method that takes four input values, each representing one side of a proper tetragon. The function returns
Suppose that we have a class with some method that takes four input values, each representing one side of a proper tetragon. The function returns the information
a String
telling whether the given values represent the side lengths of a Square, a Rectangle, or a Trapezoid.
public class identifyShapes
public String identifyTetragon
int a
int b
int c
int d
throws
NotAValidTetragon,
InvalidSideException
The method throws a NotAValidTetragon exception if the supplied values do not fit into any of the possible three tetragons it is expected to find out, and the function throws a InvalidSideException if any of the supplied values do not represent a valid value for a geometric shape.
Types of proper tetragons the function can discriminate are:
a
Identify the equivalence classes for both the input and output domains of the above function, and come up with a proper diagram
similar to the partitioning diagram available on s
b
Develop a set of test cases, i
e
test suite for the method for which a Java signature is given above. You are NOT expected to write the Java source code for the implementation of the above given method, but only to list the test inputs, and expected outputs, i
e
fill in the below table. You can add rows to the below table as required. Make sure that each equivalence class you identified above is covered with at least one test case, and also boundary value analysis is applied for all boundarie
TestCaseNumber Unit Under Test a b c d Expectedoutput
TC#
TC#
TC#nEquivalence partitioningEquivalence partitioning
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started