Complete the RectangleManager class below so that it implements the given Adjuster interface. The implementation should use the h and w parameters as the incremental amounts by which the o object's current height and width are to be changed, respectively.

For example, if the original rectangle has width of 10 and height of 20, and the increments are 5 and 7 for width and height respectively, the new dimensions of the rectangle should be width of 15 and height of 27.

Complete the following file:

RectangleManager.java

/** Manages modifications to rectangle objects */ import java.awt.Rectangle; public class RectangleManager implements Adjuster { // TODO: Implement the adjustDimensions method from the // interface. }

Use the following files:

Adjuster.java

/**
   Provides generalized support for adjusting the dimensions
   of any object with a height and a width.
*/
public interface Adjuster
{
   Object adjustDimensions(Object o, int w, int h);
}

RectangleManagerTester.java

/**
   Tests the implementation of the RectangleManager class
*/

import java.awt.Rectangle;

public class RectangleManagerTester
{
   public static void main(String[] args)
   {
      Rectangle r = new Rectangle(0,0,10,20);
      RectangleManager rectMgr = new RectangleManager();
      int w = 5;
      int h = 7;
      r = (Rectangle) rectMgr.adjustDimensions(r, w, h);
      String dims = r.width + " x " + r.height;
      System.out.println("New dimensions: " + dims);
      System.out.println("Expected: 15 x 27");
   }
}