CS 1063  Lab 5:  Designing and Implementing a Class

The Square Class

Objectives

Hand-in Requirements

All projects and laboratories will be submitted electronically through WebCT.  Zip up your entire project folder to submit as the source.  (Right click on the project folder and follow the SentTo link.) The project folder should include the following:

Details

Implement a class Square that has methods double getSide(), String toString(), double calculateArea(), and double calculatePerimeter().  In the constructor, supply the side of the square.  To test the Square class instantiate two squares with different length sides and print the side, area and perimeter.  Be sure you test ALL of your methods.

Follow the steps below.
  1. Design the public interface for the Square Class.

  2. Setup:

  3. Implement the class