how would I code this?

Question Answered step-by-step how would I code this? Image transcription textInstructions Assume you have a class Square. This class has an instance variable, side that is protected and oftype double. Write the class definition of a subclass of Square called FancySquare that has a method calledgetDiagonal. The getDiagonal method gets no arguments but returns the value of side multiplied … Show more… Show morehow would I code this? Computer Science Engineering & Technology Java Programming COP 3804 Share QuestionEmailCopy link Comments (0)