Shapes(object orianted prog in java=first example)

Create a project called Shapes in Netbeans first and then add the following classes into the
same file.
i. Implement a class called Triangle which is not public. Add the following into this
class:
a) Declare 4 static variables to represent the 3 sides and the height of a triangle. The
lengths might be decimal numbers like 3.5 . You can assume that the last side entered
is the base of the triangle which will be used in the calculation of area.
b) Write a Read method that reads the numbers for sides and the height.
c) Write a method that computes the perimeter of a triangle. The value of the
perimeter must be stored in a non-static global variable called perimeter.
d) Write a method that computes the area of a triangle. The value of the area must be
stored in a non-static global variable called area. (Area = base X height/2).
ii. Implement a class called Rectangle which is not public. Add the following into this
class:
a) Declare 2 non-static variables to represent the 2 different sides of a rectangle. The
lengths might be decimal numbers like 3.5 .
b) Write a Read method that reads the numbers for these two different sides.
c) Write a method that computes the perimeter of a rectangle. The value of theperimeter must be stored in a non-static global variable called perimeter.
d) Write a method that computes the area of a rectangle. The value of the area must be
stored in a non-static global variable called area.
iii. Implement a class called Circle which is not public. Add the following into this class:
a) Declare a non-static variable to represent the radious of a circle. The radious might
be decimal numbers like 3.5 .
b) Write a Read method that reads the radious.
c) Write a method that computes the perimeter of a circle (2*pi*r). The value of the
perimeter must be stored in a non-static global variable called perimeter.
d) Write a method that computes the area of a circle. The value of the area must be
stored in a non-static global variable called area.
iv. Now do the following in the main method of the Shapes class:
a) Create a Circle object and display its perimeter and the area for the radious read.
b) Create a Rectangle object and display its perimeter and the area for the sides read.
c) Create a Triangle object and display its perimeter and the area for the sides and
height read.
d) Create another Circle object and display its perimeter and the area for the radious
read.