Triangle.java - File Triangle.java Author DeAnna Crate Date...

This preview shows page 1 out of 1 page.

/* * File: Triangle.java * Author: DeAnna Crate * Date: 6/27/2020 * Purpose: grandchild of shape, child of TwoDimensionalShape */ package project1; import java.util.Scanner; public class Triangle extends TwoDimensionalShape{ double base; double height; Triangle(int numDimensions, double area, double b, double h){ super(numDimensions, area); b = base; h = height; } void getArea(){ try{ Scanner s = new Scanner(System.in);

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture