edu.unca.cs.csci201.LabAids
Class Triangle

java.lang.Object
  extended by edu.unca.cs.csci201.LabAids.Triangle

public class Triangle
extends java.lang.Object

Creates and draws an upwarding pointing triangle.


Constructor Summary
Triangle(int x, int y, int length, java.awt.Color c)
          Constructs the triangle
 
Method Summary
 void draw(java.awt.Graphics g)
          Draws the triangle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Triangle

public Triangle(int x,
                int y,
                int length,
                java.awt.Color c)
Constructs the triangle

Parameters:
x - X co-ordinate of the top vertex of the triangle
y - Y co-ordinate of the top vertex of the triangle
length - Length of a side of the triangle
c - Color of the triangle
Method Detail

draw

public void draw(java.awt.Graphics g)
Draws the triangle

Parameters:
g - Graphics object for drawing the triangle