Lab1 report

1:In the first step, I added the junit and hamcrest jar documents  to my new project through clicking the build path selection and adding external jars to the library. Then, I decompressed the eclemma bag to the the dropins file folder belonging to the eclipse file folder.  After all of these, the IDE was ready.

2: In the second step, I began to distinguish the type of the triangle with java codes. First and foremost, I create a class named Triangle in possession of four methods, that is, Untriangle that judges whether the number user input could compose a triangle, Equilateral which judges whether all the laterals of the triangle are equal and  Isosceles that check if there exists only two lateral of the triangle that are equal to each other and Scalene that check the triangle is neither equilateral or isoceles. After that I create the test file which also contain four test method to do the test with the testcase. Here is a picture of the case and the result of the test.

 use coverage rate

原文地址:https://www.cnblogs.com/pzyskytree/p/5292270.html