# Triangle Lab Write the APTriangle class. Your implementation must include three double instant…

Triangle Lab

Write the APTriangle class. Your implementation must include three double instant variables a, b, and c representing lengths of the sides of a triangle. Also, it must include:

• a constructor that has three double parameters (entered in any order);

(Hint: Make sure that you check whether the triangle exists)

The Triangle Inequality Theorem below states the conditions that make a triangle possible.

If a triangle with the given set of sides is not possible the constructor must set the values of a, b, and c equal to 0.

If a triangle with the given set of sides is possible the constructor must set the values in the following order:

• a is the shortest side;
• b is the middle side;
• c is the longest side;
• double getA(), double getB() , double getC()methods;
• method double getPerimeter() that calculates and returns the perimeter of the triangle or a 0 if the triangle does not exist.
• method double getArea() that calculates and returns the area of the triangle or a 0 if the triangle does not exist. Make sure not to re-implement the existing code.

Triangles can be classified by their sides and by their angles.

Write two methods that determine type of a triangle.

• method String compareBySides()that returns Strings “equilateral”, “isosceles”, “scalene” or a null if the triangle does not exist.
• method String compareByAngles()that returns Strings “acute”, “right”, “obtuse” or a null if the triangle does not exist.

method double largestAngle()that returns the measure in degrees of the largest angle in a triangle or a 0 if the triangle does not exist. (Hint: you can use the Law of Cosines to calculate the measure of the angle)

In order to solve for the unknown angle use a different form of this Law:

The following Math class methods could be useful here:

• public static double acos(double a)

Returns the arc cosine of a value; the returned angle is in the range 0.0 through pi.

If the argument is NaN or its absolute value is greater than 1, then the result is NaN.

• public static double toDegrees(double angrad)

Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

The conversion from radians to degrees is generally inexact; users should not expect cos(toRadians(90.0)) to exactly equal 0.0.

method String locationOfCircumcenter()that returns Strings “inside”, “outside”, “on” or a null if the triangle does not exist. Make sure not to re-implement the existing code.

Below are some suggested APTriangles to test:

t1= new APTriangle(0,4,2);
t2= new APTriangle(0,4,0);
t3= new APTriangle(0,0,0);
t4= new APTriangle(2,1,3);
t5= new APTriangle(5,7,8);
t6= new APTriangle(8, 6,4);
t7= new APTriangle(1, 1, 1.42);
t8= new APTriangle(1, 2, 1.73);
t9= new APTriangle(3, 4, 5);
t10= new APTriangle(5, 3, 4);
t11= new APTriangle(4, 4, 6);
t12= new APTriangle(7,7,7);
t13= new APTriangle(7,1,7);
t14= new APTriangle(7, 5, 8);
t15= new APTriangle(12,5,14);
t16= new APTriangle(8, 6, 10);
t17= new APTriangle(3.8, 5.6, 8.8);
t18= new APTriangle(0.8, 1.6, 4.8);
t19= new APTriangle(3.8, 9.5, 6.46);
t19= new APTriangle(3.8, 2.5*3.8, 1.7*3.8);
t20= new APTriangle(4.6, 4.5*1.35, 6.5);

Calculate the price
Pages (550 words)
\$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Online Academic Experts
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
excellent
Customer 453201, October 22nd, 2022
Humanities
Thank youuuu
Customer 452729, May 30th, 2021
History
Looks great and appreciate the help.
Customer 452675, April 26th, 2021
Communications
Thank you so much for your attention to this assignment and timeliness.
Customer 453111, November 12th, 2022
Nursing
Impressive writing
Customer 452547, February 6th, 2021
Human Resources Management (HRM)
Very well written and very impressed with this service!
Customer 453077, February 16th, 2022
English 101
Thank you for this excellent analysis of the Alchemist.
Customer 453213, June 15th, 2022
excellent work
Customer 453201, November 1st, 2022
Human Resources Management (HRM)
On time and as always a great service! This semester has been very time consuming a tough for my family so this service has not only been a life saver but helped me keep up my grades! If you are in a time crunch or need help, don't hesitate! They are worth it!
Customer 453077, April 4th, 2022
awesome work
Customer 453201, June 15th, 2022
Human Resources Management (HRM)
Always great! My son has been in critical health these last few semesters. Many times I have thought he wasn't going to make it and thought about quitting or postponing school until he was healthier but it always happens to be in the middle of the semester. This service has been a lifesaver for my mindset in helping keep my grades up and keep my son alive at the same time. I don't know if I could have made it through this period without it.
Customer 453077, June 6th, 2022
Psychology
Thank you!
Customer 452545, February 6th, 2021
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend