1. Engineering
  2. Computer Science
  3. objective this closed lab will provide you with some basic...

Question: objective this closed lab will provide you with some basic...

Question details

Objective: This closed lab will provide you with some basic experience with conditionals, theif-else statement, and logical operators. Detailed Instructions Write a program that reads three vertices (x and y coordinates), computes the three edges of the triangle with the three vertices, and then computes the perimeter of the triangle if the input is valid. Consider the three input vertices to be (x, y), (x2. Уг), and (x, y). Then, ез A triangle is valid if the sum of every pair of edges of the is greater than the remaining edge. If the triangle is valid, print out the perimeter. If the triangle is invalid, print out an error statement saying that the triangle is invalid. You can use the Math.sqrt (n) library method to compute the square root of a number n You must use a single if statement, with a conditional expression constructed using logical operators to determine validity of the triangle.

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