Print a Shape
1. Write a java program printShape, in the main method asks the user to enter a positive even number less than 20, greater than 2.
1) If the number is 6, 14 or 16, create a circle, calculate the area of the square,
2) if 4, 10, or 18,create a rectangle with length is the number times 2, and the number is the height; calculate the area of the rectangle,
3) With all the other even numbers, print out the number is not valid.
4) A validation method to validate the input (range is less than 20, greater than 2, it is an even number).
2. Write an interface of Shape with a method of drawing().
3. Write a class of Circle implements Shape
1) a private variable radius as int type;
2) a constructor with radius passed in;
3) a method of calculateArea() -- return the area of circle as Math.PI * radius * radius.
4) a method of drawing() -- print the information of the circle(This is a circle of radius.);
4. Write a class of Rectangle implements Shape
1) 2 private variables length and width as int type;
2) a constructor with width passed in and calculate the length as width*2;
3) a method of calculateArea() -- return the area of rectangle as length*width.
4) a method of drawing() -- print the rectangle information(This is a rectangle of length X width);
Note: You will need submit Shape.java, Circle.java, Rectangle.java.