Your Perfect Assignment is Just a Click Away

Starting at $8.00 per Page

100% Original, Plagiarism Free, Customized to Your instructions!

glass
pen
clip
papers
heaphones

University of Missouri Kansas City Java Packages Software Engineering Questions

University of Missouri Kansas City Java Packages Software Engineering Questions

Question Description

The problems are based on the given Java programs contained in Triangle.zip. Do not make any changes to the code. If you choose to use a different object-oriented language, it is your responsibility to translate the code correctly.

Download Triangle.zip and unzip it. The source code has seven Java packages: correct, bug1. bug2,…, and bug6. Each package contains a class Triangle.java. Triangle.java in the “correct” package is a correct program that reports the type (RIGHT, OBTUSE, ACUTE and NOTRIANGLE) of a triangle whose three angles are given as integers (angleA, angleB, angleC). Triangle.java in each bugX (X=1, …, 6) package has a bug.

  • Compare each buggy version of Triangle.java with the correct version of Triangle.java and describe the fault detection condition (including reachability, necessity, and propagation constraints) that any test case must satisfy in order to find the bug (refer to the slides on fault detection condition). Use the following table to document your answers (20 points).
  • Complete the following table of equivalence classes. (20 points)
  • Complete the following table of boundary values. (20 points)
  • Complete the following table of test cases only based on the equivalence partitioning in (2) and boundary value analysis in (3). You should add new rows as needed. (10 points)
  • Write a JUnit class TriangleTest.java in the “correct” package to implement all the test cases in (4). Here is a sample JUnit test.
  • Based on the test cases in (4) and their execution in (5), complete the following table about the coverage of each conditional statement in the correct Triangle.java program (10 points).
  • Copy your TriangleTest.java in (5) to each bugX (X=1, 2, …, 6) package. Make sure the package statement in TriangleTest.java is corrected so that you can test Triangle.java in the same package. Report your test results in the table below and attach a screenshot of the test execution for each bugX package. (10 points)

#

Incorrect expression

Correct expression

Description of fault detection condition

Bug1

if (angleA <= 1 || angleB <= 0 || angleC <=0){

if (angleA <= 0 || angleB <= 0 || angleC <=0){

Bug2

if (angleA+angleB+angleC > 180) {

if (angleA+angleB+angleC != 180) {

Bug3

if (angleA== 90 || angleB == 90)

if (angleA== 90 || angleB == 90 || angleC == 90) {

Bug4

if (angleA== 90 || angleB == 90 || angleC >= 90)

if (angleA== 90 || angleB == 90 || angleC == 90) {

Bug5

if (angleA > 90 || angleB > 90 || angleC > 91)

if (angleA > 90 || angleB > 90 || angleC > 90)

Bug6

if (angleA > 90 || angleB > 90 || angleC > 100)

if (angleA > 90 || angleB > 90 || angleC > 90)

Condition

Valid classes

Invalid classes

angleA

angleB

angleC

angleA+angleB+angleC=180

Variable

Boundary values from valid classes

Boundary values from invalid classes

angleA

angleB

angleC

angleA+angleB+angleC

Test #

Test Input

Oracle Value

(expected result)

angleA

angleB

angleC

1

2

3

public void testAcuteTriangle () {

Triangle triangle =new Triangle(50, 60, 70);

assertTrue(triangle.reportTriangleType()==Triangle.TriangleType.ACUTE);

}

Run and debug TriangleTest.java in the “correct” package until there is no failure. If there is a failure, then something is wrong with your tests and you must fix it. Copy and paste your test code here, and attach a screenshot of your test execution that shows that all tests have passed. (10 points)

Conditional statement

Is statement coverage achieved?

Is branch coverage achieved?

Yes/No

If yes, list the test cases that achieved the statement coverage

Yes/No

If yes, list the test cases that achieved the branch coverage

if (angleA <= 0 || angleB <= 0 || angleC <=0)

if (angleA+angleB+angleC!= 180)

if(angleA== 90 || angleB == 90 || angleC == 90)

if(angleA > 90 || angleB > 90 || angleC > 90)

Note: To get full credits for (2), (3), and (4), your tests must be able to find at least 4 of the bugs. These tests must result from the techniques in (2) and (3).

Version

Test failure: Yes or No?

If Yes, list the tests that failed; If No, explain why

Bug1

Bug2

Bug3

Bug4

Bug5

Bug6


"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.