Write down all the shapes you can think of–both two-dimensional and three-dimensional– and form those shapes into a shape hierarchy. Your hierarchy should have superclass Shape, from which class TwoDimensionalShape and class ThreeDimensionalShape are derived. Once you have developed the hierarchy, define each of the classes in the hierarchy. We will use this hierarchy in the exercises to process all shapes as objects of superclass Shape.
i hAVE DONE THIS SO FAR BUT NOW I AM REALLY LOST
public class Shapes {
int width;
int length;
int name;
int numberOfSides;
public void displayShape(int x){
system.out.println("Shapes of diffent dimension")
}
public class TwoDimShape extends Shapes{
public void displayShape(int x) {
System.out.println("Two dimensional shapes");
}
public class ThreeDimShape extends Shapes {
int height;
public void displayShape(int x)
System.out.println("Three dimensional shapes");
}
public class quadlateral extends TwoDimShape {
public void displayshape(x);
System.out.println("Quadlateral shapes");
}
public class sphere extends ThreeDimShape {
public void displayshape(x);
System.out.println("Sphere");
}
public static void main(String[] args) {
Scanner input = new Scanner( System.in );
}
}