shapes.java:52: error: reached end of file while parsing
}
^
1 error
Here's my code:
import java.util.Scanner;
class shapes
{
void shapes()
{
System.out.println("Areas of Circle, Rectangle, And Square...");
}
}
class circle extends shapes
{
void circle(double a, double B)/>
{
System.out.println("Area Of Circle:");
System.out.println(a*b*B)/>;
}
class rectangle extends shapes
{
void rectangle(double a, double B)/>
{
System.out.println("Area Of Rectangle:");
System.out.println(a*B)/>;
}
class square extends shapes
{
void square(double a)
{
System.out.println("Area Of Square:");
System.out.println(a*a);
}
}
class Stuff
{
public static void main(String args[])
{
Scanner input = new Scanner(System.in);
System.out.println("Circle - Enter Diameter...");
double a = input.nextDouble();
double b = a / 2;
circle objc = new circle();
objc.circle(3.14, B)/>;
rectangle objr = new rectangle();
System.out.println("Enter Length And Width Of Rectangle...");
double c = input.nextDouble();
double d = input.nextDouble();
objr.rectangle(c, d);
square objs = new square();
System.out.println("Enter Length Of One Side Of Square...");
double x = input.nextDouble();
objs.square(x);
}
}
Thanks for any help

New Topic/Question
Reply



MultiQuote




|