hi everyone

i am doing this course work, where i have two classes. one is the point2d that models a two-dimensional point. The second part, the rectangle class, require the use of the Point2D class developed in the first part of the coursework.

i am stuck in following two functions:

1. Provide a method shrink( int a, int b ) which takes a rectangle and returns a rectangle with the same top-left vertex but whose width and height are reduced by amounts a, b respectively

2. Given any non-empty rectangle, a tower of rectangles can be constructed using the given rectangle as a base, by placing a sequence of rectangles on top of one another, each of whose width and height are two units smaller and one unit smaller respectively than the immediate rectangle it rests upon. The top-most rectangle will therefore have a width/height of either one or two depending on whether the width/height of the base rectangle is odd or even.

Write a static method findTowerArea( ... ), in your main application class, that calculates the total area of such a tower structure for any given base rectangle and include it in the main program, as described below.

plz give me any suggestions of how to write it. e.g. samples

thank you