Fill in Order Details

  • Submit paper details for free using our simple order form

Make Payment Securely

  • Add funds to your account. There are no upfront payments. The writer will only be paid once you have approved your paper

Writing Process

  • The best qualified expert writer is assigned to work on your order
  • Your paper is written to standard and delivered as per your instructions

Download your paper

  • Download the completed paper from your online account or your email
  • You can request a plagiarism and quality report along with your paper

homework software engineering 1

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

WHAT OUR CURRENT CUSTOMERS SAY

  • Google
  • Sitejabber
  • Trustpilot
Zahraa S
Zahraa S
Absolutely spot on. I have had the best experience with Elite Academic Research and all my work have scored highly. Thank you for your professionalism and using expert writers with vast and outstanding knowledge in their fields. I highly recommend any day and time.
Stuart L
Stuart L
Thanks for keeping me sane for getting everything out of the way, I’ve been stuck working more than full time and balancing the rest but I’m glad you’ve been ensuring my school work is taken care of. I'll recommend Elite Academic Research to anyone who seeks quality academic help, thank you so much!
Mindi D
Mindi D
Brilliant writers and awesome support team. You can tell by the depth of research and the quality of work delivered that the writers care deeply about delivering that perfect grade.
Samuel Y
Samuel Y
I really appreciate the work all your amazing writers do to ensure that my papers are always delivered on time and always of the highest quality. I was at a crossroads last semester and I almost dropped out of school because of the many issues that were bombarding but I am glad a friend referred me to you guys. You came up big for me and continue to do so. I just wish I knew about your services earlier.
Cindy L
Cindy L
You can't fault the paper quality and speed of delivery. I have been using these guys for the past 3 years and I not even once have they ever failed me. They deliver properly researched papers way ahead of time. Each time I think I have had the best their professional writers surprise me with even better quality work. Elite Academic Research is a true Gem among essay writing companies.
Got an A and plagiarism percent was less than 10%! Thanks!

ORDER NOW


Consider Your Assignments Done

“All my friends and I are getting help from eliteacademicresearch. It’s every college student’s best kept secret!”

Jermaine Byrant
BSN

“I was apprehensive at first. But I must say it was a great experience and well worth the price. I got an A!”

Nicole Johnson
Finance & Economics

Our Top Experts

See Why Our Clients Hire Us Again And Again!


OVER

10.3k
Reviews

RATING
4.89/5
Average

YEARS
13
Mastery

Success Guarantee

When you order form the best, some of your greatest problems as a student are solved!

Reliable

Professional

Affordable

Quick

Using this writing service is legal and is not prohibited by any law, university or college policies. Services of Elite Academic Research are provided for research and study purposes only with the intent to help students improve their writing and academic experience. We do not condone or encourage cheating, academic dishonesty, or any form of plagiarism. Our original, plagiarism-free, zero-AI expert samples should only be used as references. It is your responsibility to cite any outside sources appropriately. This service will be useful for students looking for quick, reliable, and efficient online class-help on a variety of topics.