Student Name: __________________
Class and Section __________________
Total Points (20 pts) __________________
Due: September 12, 2016 before the class
Project: The Triangle Class
CSCI 1302 Advanced Programming Principles
Armstrong Atlantic State University
Problem Description:
Design a class named Triangle that extends
GeometricObject. The class contains:
• Three double data fields named side1, side2, and side3
with default values 1.0 to denote three sides of the
triangle.
• A no–arg constructor that creates a default triangle.
• A method named getPerimeter() that returns the
perimeter of this triangle.
• A method named toString() that returns a string
description for the triangle.
For the formula to compute the area of a triangle, see
Exercise 5.19. The toString() method is implemented
as follows:
Design:
Draw the UML class diagram here