1. Engineering
  2. Computer Science
  3. solve it in java starting with the starter code work...

Question: solve it in java starting with the starter code work...

Question details

solve it in Java .Starting with the Starter Code, work inside of class Triangle. The Triangle class will keep track of the sides with an integer array with three elements. The only attribute for class Triangle will be the array. The behaviors (methods) for the Triangle class will be findPerimeter() and isValid(). The perimeter is simply all the sides added together. The triangle is not valid if two of the sides of the triangle added together are less than the third side. https://www.wikihow.com/Determine-if-Three-Side-Lengths-Are-a-Triangle Inside the main method you will ask for the three sides of the triangle with the prompt: Enter a side of a triangle. Use the data entered to create a Triangle object. Call isValid() and findPerimeter() on the Triangle object and print out the results to the console.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution