Question: By using PHP and HTML Create a circle class that will accept radius as an optional argument. Create radius, diameter, area and circumference properties. Using
By using PHP and HTML Create a circle class that will accept radius as an optional argument. Create radius, diameter, area and circumference properties. Using a constructor function, calculate the diameter, area, and circumference of the circle based on the argument provided. Also, create methods to get and set each property. Use The pi(), number_format() and pow() functions to help you with the codes. Once a circle object is initialized, print the following messages to the browser:
The radius of the circle is 3
The diameter of the circle is 6
The area of the circle is 28.27
The circumference of the circle is 18.85
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
