Question: The instructions: circle.php: 1: 2: circle_form.php The circle application in this lab accepts inputs for x and y coordinates of the center point and the

The instructions:
The instructions: circle.php: 1: 2: circle_form.php The circle application in this lab
accepts inputs for x and y coordinates of the center point and
the radius of a circle. It then calculates and displays the area
circle.php:
1:
and circumference of the circle along with x and y coordinates and
2:
the radius. The Circle Application The Circle Application The details of the
circle_form.php
code Later coordinades of the circle Xcode Y coor Radio Ce15.1 Radio

The circle application in this lab accepts inputs for x and y coordinates of the center point and the radius of a circle. It then calculates and displays the area and circumference of the circle along with x and y coordinates and the radius. The Circle Application The Circle Application The details of the code Later coordinades of the circle Xcode Y coor Radio Ce15.1 Radio 12 49316 Ceresce75.36 Create the point.class.php file 3. Create a new file and save it as point.class.php. Define the point class in the file. a. The Point object models a geometric point. b. It contains two private attributes. i. XCoord: the x coordinate of a point, an integer li. yCoord: the y coordinate of a point, an integer C. The constructor should accept two integers and assign them to the two data attributes. d. The two get methods return the x and y coordinates of the point, respectively. Create the circle.class.php file 4. Create another file and save it as circle.class.php. Define the Circle class in the file. a. The Circle object models a geometric circle. b. It has two private data attributes. 1. radius: the radius of a circle, a float with one decimal. II. center the center point of a circle. This is an object of the point class. C. The constructor should accept two parameters: a float and an object of the point class. d. The getCenter method returns the center of a circle, which is an object of the point class e. The other three get methods return a circle's radius, area, and circumference. They should be formatted to floats with one decimal for radius and two decimals for area and circumference. You may use the built-in function named number_format to format numbers in PHP f. The toString method returns a string describing a circle in this format: Center: Ix-coord, y coord) Radius: radius Area: area Circumference: circumference Modify the circle.php file 5. Modify the circle php file by adding code into the else clause. Below is a list of things needed to be done Retrieve three numbers from the three textboxes in the input form b. Validate the numbers to make sure they are greater than 0. If anyone is less than or equal to 0, display an error and terminate the program. c. If all inputs are valid, create objects from the point and Circle classes using the values retrieved from the input form. Call the toString() method and display details of the circle. Please note that the getCenter method in a Circle object returns a Point object. In order to determine the x and y coordinates of the circle, the getxCoord and getyCoord methods have to be called with the returned Point object. In the following examples, assume $c contains a Circle object. $p - $C -> get Center(); //get the center point $x - $p -> get XCoord(); W/get the x coordinate $y = $p >> getycoord(); //get the y coordinate You may use method chaining: $x = $c ->getCenter() ->getxCoord(); $y = $c->getCenter() ->getycoord(); Test your application with the following cases Ecated the circle The details of the circle Centar (53) Radius 12 Area 5216 Circunference 7546 The details of the circle: Center (4.12) Radio 58 Ara 105 Curcumference 3642

The Circle Application

The Circle Application

25 Kstrong>Enter coordinates and radius of the circle:

x coordinate:
Y coordinate:
Radius:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!