Getting Ready: Before going any further, you should:
RectangleArea with inputs 10.5 and 13.2.
test01.inp?
test01.exp) and the actual output.
Geometry class are tested
in GeometryDriver.java and how many unit tests does it
contain?
rectangleArea() method (one of
which must use the same values as the system test above).
GeometryDriver.
GeometryDriver. Without looking at the source code,
would you be able to tell if the output was correct or not?
Why or why not?
GeometryDriver so that it prints both the
expected value and the actual value for each test.
GeometryDriver contained 100 tests.
Would you want to read through all of the output to see if
there were any failures?
anglesIn()
so that
it only generates output when there is a failure.
rectangleArea()? (Hint: Think about
performing arithmetic operations on double values.)
GeometryDriver. From a design perspective (not a testing
perspective), what would be wrong with the GeometryDriver
class?
Test that contains no methods.
Test class with the following
signature:
public static void forEqualInt(int expected, int actual, String description)
that prints the description if the values
of expected and actual are not the same.
anglesIn() method in the
GeometryDriver class so that they use this method.
Test class with the following
signature:
public static void forEqualDouble(double expected, double actual,
double tolerance,
String description)
that prints the description if the difference
between the double values
expected and actual is not within the
given tolerance. Hint: Use Math.abs() to find the
absolute value.
rectangleArea() method in the
GeometryDriver class so that they use this method
(with a tolerance of 0.01).
GeometryDriver
GeometryDriver and make sure this is the case.
rectangleArea() method in the
Geometry class so that it incorrectly calculates the
area as the width times the width.
GeometryDriver.
Geometry class.
Geometry class, and understand
the output?
Copyright 2020