Love Work Family Friends Games Kids Life

Posted by on 2011/02/16 under Uncategorized

import java.awt.*;
import javax.swing.*;
import java.applet.*;
import java.util.*;

public class MathLan01
public static void main(String args[])

class Geometry
static int height;
static int width;
static int length;
static int base1;
static int base2;
static int side;
static int radius;
public static void dataEntry()
Scanner input = new Scanner(;

System.out.println(“Enter Height ==>”);
int height = input.nextInt();
System.out.println(“Enter Width ==>”);
int width = input.nextInt();
System.out.println(“Enter Length ==>”);
int length = input.nextInt();
System.out.println(“Enter Base1 ==>”);
int base1 = input.nextInt();
System.out.println(“Enter Base2 ==>”);
int base2 = input.nextInt();
System.out.println(“Enter Side ==>”);
int side = input.nextInt();
System.out.println(“Enter Radius ==>”);
int radius = input.nextInt();

public static void display2DPerimeters()
System.out.println(“2 Dimensional Shapes: Perimeters”);
System.out.println(“Square Perimeter: “+perimeter(side));
System.out.println(“Pentagon Perimeter: “);//+Geometryclass.squarePerimeter);
System.out.println(“Hexagon Perimeter: “);//+Geometryclass.squarePerimeter);
System.out.println(“Octoagon Perimeter: “);//+Geometryclass.squarePerimeter);
System.out.println(“Rectangle Perimeter: “);//+Geometryclass.squarePerimeter);
System.out.println(“Circle Perimeter Perimeter: “);//+Geometryclass.squarePerimeter);

public static int perimeter(int n1)
int sum = n1+n1+n1+n1;
return sum;

class Util
public static void skipln(int n)
for (int x = 0; x

Leave a Reply

Name and Mail are optional. Your email address is however required if you want to subscribe to the comments (see below)

This site uses Akismet to reduce spam. Learn how your comment data is processed.