Question: Question 16 (6 points) Write the implementation for the Square class with the following requirements . A square has one field named side that has

Question 16 (6 points) Write the implementation for the Square class with the following requirements . A square has one field named "side" that has a real value. . Provide a public constructor that accepts a side. . Encapsulate the field "side" with a public getter and setter. . Provide a public method that calculates the perimeter of the square. . Side cannot be accessed or modified without using the public interface. Code the class using correct syntax. .There should be no main method in the class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
