Question: Create a PHP class that implements the the following function: /** * Returns an array with the 'count', 'min', 'max', 'average' and 'stddev' for the

Create a PHP class that implements the the following function:

 /** * Returns an array with the 'count', 'min', 'max', 'average' and 'stddev' for the device * weights obtained from the data document described by the schema. * * @param string $url the URL of an XML document containing the device-list * * @return array with keys: 'count' has an integer value equal to the number of individual devices in * the device list (number of device element times the quantity of each); and 'min', 'max', * 'average' and 'stddev' are the minimum, maximum, arithmetic mean (average) and * standard deviation of the weights of all devices. All weight statistics should be returned * in US ounces. * * @throws InvalidArgumentException if the URL is invalid * @throws RuntimeException on networking or document processing error */ public function deviceListInfoSummary($url); 

Use the following XML schema and example data files:

                                                          

3.00

3.34

0.50

3.00

1.33

10.00

1.81

6.00

10.00

1.53

1.25

12

0.63

1.00

40.00

0.25

0.94

12

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!