please also give an explanation to the answer for the question c question 4 during s 5154080

Question 4 During semester you were introduced to the substitution principle as it applies to writing Java methods and classe

Please also give an explanation to the answer for the question (c).

Question 4 During semester you were introduced to the substitution principle as it applies to writing Java methods and classes. The following questions refer to the class structure given below. class X { /** * Grequire fontSize > 5 @ensure |result >= 0 / int detexify ( Obj ect symbol, float fontSize) // Things happen here class Y extends X { /* *Orequire fontSize > 0 @ensure result > 0 */ int detexify (Object symbol, // Other things happen here float fontSize) { class Z extends X { /** @require fontSize > 5 @ensure result > 0 int detexify (0bject symbol, float fontSize) { //Do other things happen here ? a) Give one reason a programmer would choose to use a precondition b) Does Y violate the substitution principle? Why/why not? c) How would you change the postcondition of class Z so that it violates the substitution principle?

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now