Complete rewrite of the plugin so it doesn't use the jalopy ant task anymore. Using a jellybean instead, copied and adapted from the m2 jalopy plugin at mojo. Added new properties maven.jalopy.inspect, maven.jalopy.backup and maven.jalopy.force. Removed properties maven.jalopy.logLevel and maven.jalopy.nbThread. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@398096 13f79535-47bb-0310-9956-ffa450edef68
58 lines
1.0 KiB
Java
58 lines
1.0 KiB
Java
package com.shape;
|
|
|
|
public class Rectangle
|
|
{
|
|
private float Hypotenuse;
|
|
private int Area;
|
|
private int Height;
|
|
private int Perimeter;
|
|
private int Width;
|
|
|
|
public int getArea( )
|
|
{
|
|
this.Area = this.Width * this.Height;
|
|
|
|
return this.Area;
|
|
}
|
|
|
|
public void setHeight( int height )
|
|
{
|
|
Height = height;
|
|
}
|
|
|
|
public int getHeight( )
|
|
{
|
|
return this.Height;
|
|
}
|
|
|
|
public float getHypotenuse( )
|
|
{
|
|
this.Hypotenuse = (float) Math.sqrt( Math.pow( this.Height, 2.0 ) + Math.pow( this.Width, 2.0 ) );
|
|
|
|
return this.Hypotenuse;
|
|
}
|
|
|
|
public int getPerimeter( )
|
|
{
|
|
this.Perimeter = ( 2 * this.Width ) + ( 2 * this.Height );
|
|
|
|
return this.Perimeter;
|
|
}
|
|
|
|
public void setWidth( int width )
|
|
{
|
|
Width = width;
|
|
}
|
|
|
|
public int getWidth( )
|
|
{
|
|
return this.Width;
|
|
}
|
|
|
|
public void setWidthHeight( int width, int height )
|
|
{
|
|
setWidth( width );
|
|
setHeight( height );
|
|
}
|
|
}
|