Answer:
A simple php code for the following is given below:
Explanation:
interface Calculate {
public function area($lenght,$width);
public function perimeter($length,$width);
public function surfaceArea($length_side_1,$length_side_2);
public funcction volume($length, $width, $height):
}
interface Calculate2 {
public function area($raidus);
public function perimeter($radius);
public function surfaceArea($radius);
public funcction volume($radius):
}
Class Mian{
width=please Enter the value of width
height=please Enterr the value of height
length=please enter the value of length
lenght2=please enter the value of lenth of side 2
ridus= please enter the value of radius
Circle = new circle()
Rectangle = new rectangle()
}
Class Circle implements Calculate2{
public function area(){
area= pi*r
return area
}
public function perimeter(){
perimeter=2*pi*r
return perimeter
}
public function surfaceArea(){
surfacearea= pi*r*r
}
public function volume(){}
area=area()
volume=area*height
return volume
}
Class Rectangle implements Calculate{
public function area(lenght,width){
area= length * width
return area
}
public function perimeter(lenght,width){
perimenter=2(lenght+width)
return perimeter
}
public function surfaceArea(length_side_1, withd right place){}
surface_area 2*length_side_1 f* length_side_2_
public function volume(){}
public surface volume(length,width,height)
volume= length * width * height
return volume
}