perimeter method

  1. @override
double perimeter()
override

Calculates the perimeter of the triangle.

The perimeter is the sum of the lengths of all three sides of the triangle.

Returns the perimeter of the triangle as a double.

Implementation

@override
double perimeter() {
  return a! + b! + c!.toDouble();
}