#cs193p #assignment2 #extraTask1Have your calculator report errors. For example, the square root of a negative number or divide by zero. There are a number of ways to go about βdetectingβ these errors (maybe add an associated value to the unary/binaryOperation cases which is a function that detects an error or perhaps have the function that is associated with a unary/binaryOperation return something that is either an error or a result or ???). How you report any discovered errors back to users of the CalculatorBrain API will require some API design on your part, but donβt force users of the CalculatorBrain API to deal with errors if they donβt want to (i.e. allow Controllers that want to display errors to do so, but let those that donβt just deal with NaN and +β appearing in their UI). In other words, donβt break any callers of the API described above (who donβt care about errors) to support this feature (i.e., add methods/ properties as needed instead). You are allowed to violate Required Task 11 to implement this Extra Credit item, but not Required Task 1 (you can enhance that data structure, but not switch to a new one).https://cs193p.m2m.at/cs193p-assignment-2-extra-task-1-winter-2017/