Course Solutions Uncategorized (Solved) : Exercise 111 Triangle Class Design Class Named Triangle Extends Geometricobjectjava Class Q30268741 . . . .

(Solved) : Exercise 111 Triangle Class Design Class Named Triangle Extends Geometricobjectjava Class Q30268741 . . . .

 

Exercise 11.1:   (The Triangle class)

Design a class named Triangle that extendsGeometricObject.javaPreview the document. The class contains:
? Three double data fields named side1, side2, and side3 withdefault values 1.0 to denote three sides of the triangle.
? A no-arg constructor that creates a default triangle.
? A constructor that creates a triangle with the specified side1,side2, and side3.
? The accessor methods for all three data fields.
? A method named getArea() that returns the area of thistriangle.
? A method named getPerimeter() that returns the perimeter of thistriangle.
? A method named toString() that returns a string description forthe triangle.

For the formula to

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post