Engineering

define a class named history with the following public interface: class history { public: history(int nrows, int ncols); bool record(int r, int c); void display() const; }; the constructor initializes a history object that corresponds to an arena with nrows rows and ncols columns. you may assume (i.e., you do not have to check) that it will be called with a first argument that does not exceed maxrows and a second that does not exceed maxcols, and that neither argument will be less than 1. the record function is to be called to notify the history object that a poisoned carrot has been dropped at a grid point that does not currently have a poisoned carrot. the function returns false if row r, column c is not within the bounds implied by the history constructor; otherwise, it returns true after recording what it needs to. this function expects its parameters to be expressed in the same coordinate system as an arena (e.g., row 1, column 1 is the upper-left-most position). the display function clears the screen and displays the history grid as the posted programs do. this function does clear the screen, display the history grid, and write an empty line after the history grid; it does not print the press enter to continue. after the display (that should be done somewhere else in the program). (note to xcode users: it is acceptable that clearscreen() just writes a newline instead of clearing the screen if you launch your program from within xcode, since the xcode output window doesn't have the capability of being cleared.)
Create a file called arrayDemo.html. This file should contain a form that has both a reset button and submit button. You should have inputs for: number of rows, number of columns, min random value, and max random value. These values should be passed to the file you must create in step 2.Create a file called arrayDemo.phpThis file should have php code embedded inside of html code such that the server will return an html file (dynamically created) to the browser (client).Your php code should do the followingFill a 2D array with the correct number of rows and columns (from part 1) between the values specified in part 1.Print the values of the array in a TableProcess the data in the array in the following manner. Create a 2nd table and print the following information. Make sure to label data with proper column headers:The sum of each row of dataThe average of each row of dataThe standard deviation of each row of data (https://www.mathsisfun.com/data/standard-deviation-formulas.html) (you can use an excel spreadsheet to easily calculate standard deviation to check your calculation).Process the data in the following manner. Create a 3rd table and print the following information. For a given row of data, print 2 rows in your tableIn the first row print the original value from your 2D arrayIn the following row, print the string "positive" if the value is > 0, or the string "negative" if the element is < 0, or "zero" if the element == 0You must make usage of the number_format() function to limit your decimal places to 3 where appropriate.Make sure that the html page generated by your PHP file includes a link back to arrayDemo.html