Question: Problem a (PA3a.java) Start from this assignment, I will keep several Junit test hide from you. You must learn how to design your program with

 Problem a (PA3a.java) Start from this assignment, I will keep several

Problem a (PA3a.java) Start from this assignment, I will keep several Junit test hide from you. You must learn how to design your program with less bug without Junit test. Write a program to evaluate the area of a triangle given the lengths of its sides using Heron's Formula'. Here is an outline: 1. Get the three side lengths from the user (which might have decimal values): a, b, c. 2. Check to ensure that the sides are valid for a triangle. Importantly, the sum of the lengths of any irger than the length of the third side (you mus 3. Calculate the semiperimeter (s): 8 = a +b+c 4. Calculate the area: area = V 8(-a)(s - b)(s - c) You must format the output to have two decimal places (even if they are both o), and round if necessary. For example: Enter the length of side a: 3 Enter the length of side b: 4 Enter the length of side c: 5 The area is 6.00 http://en.wikipedia.org/wiki/Heronis formula COMP1000 - Programming Assignment 3 You have been supplied JUnit tests for integer and decimal inputs, inputs with a side length that is too long, and inputs with negative side lengths

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!