Program to
calculate the perimeter of a square, rectangle and triangle
programtocalculatetheperimeterofasquarerectangleandtriangle.java // Program to calculate the perimeter of a square, rectangle and triangle public class Shape
// constructors public Shape()
} public Shape(int x)
public Shape(int x, int y)
public Shape(int x, int y, int z)
// method to set the name of the shape public void setShape(String m)
// Methods to calculate the perimetre of the shapes public void setPerimeter()
public void setPerimeter(int x)
public void setPerimeter(int x, int y)
public void setPerimeter(int x , int y, int z)
// methods to return the values of the perimeters public int getPerimeter()
public String getShape()
Do you have a Java Problem?
Java Books
Return to : Java Programming Hints and Tips All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|