Step 2 - Source Code Structure

All files will be in a package named 'lab4'. The package will contain the following files:

  1. Point.java: You need to implement the constructor and methods of the Point class in this file.

  2. Rectangle.java : You need to implement the constructor and methods of the Rectangle class in this file.

  3. Lab4.txt: Copy the test code that goes in `main' by clicking on the link.
    In your main method the test code will read coordinates of a rectangle from user input, and display the length, width, area, and perimeter of that rectangle. This class also contains the 'distance' method to calculate the distance between two points.

Note: Only Lab4.java contains the main method, so only generate a main method stub for Lab4.java.