Design a class named Square with field names length, area, and perimeter. Include a constructor that sets the length to 1. Include get methods for each field, but include a set method only for the length. When the length is set, calculate the perimeter and the area. Create the class diagram and write the pseudocode that defines the class.
Writing pseudocode:
Design an application that declares two Squares. Set the length of one manually, but allow the other to use the default value supplied by the constructor. Then, display each Square’s values.
Get Free Quote!
370 Experts Online