Question: Ive started theses questions but I need syntax for them. 1. (13 pts) Implement a complete Square class based on the UML below.(You do not
1. (13 pts) Implement a complete Square class based on the UML below.(You do not need to include comment header with your name, date, etc.) -size: doublethe size of a square's side +Square() Square //default constructor. Initializes size to 10 +Square(x: double) //overloaded constructor. Initializes size to x /returns a square's size +getSize( ): double +setSize(length: double): void I/size set to length if positive // otherwise size does not change +calculateAreal): double +toString(): String //returns the area of a square /returns the current state(instance variable values)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
