Question: List all methods of an object in the class Rectangle. Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set
List all methods of an object in the class Rectangle.

Class Square Declare Protected Side, Area As Float Public Square() Set Side 1.0 %3! Set Area = 1.0 End Constructor Public Subprogram SetSide (NewSide) Set Side = NewSide End Subprogram Public Subprogram ComputeArea () Set Area = Side^2 %3! End Subprogram Public Function GetArea() As Float Set GetArea = Area End Function Public Function GetSide () As Float Set GetSide = Side End Function End Class Class Rectangle Extends Square Declare Private Height As Float Public Rectangle() Call Square () Set Height = 1.0 %3! End Constructor Public Subprogram SetHeight (NewHeight) Set Height = NewHeight End Subprogram Public Function GetHeight() As Float Set GetHeight = Height End Function Public Subprogram ComputeArea () Set Area = Side * Height End Subprogram End Class
Step by Step Solution
3.49 Rating (172 Votes )
There are 3 Steps involved in it
SetHeight G... View full answer
Get step-by-step solutions from verified subject matter experts
