## Java - need help

I need help understanding the following problem:

In the village "Village" there are Shape bots - robots that can be shown in different shapes - triangle, rectangle, hexagon and circle. Each robot has a name, dimensions (that are assigned during the creation of Shape bot), strength (that is computed as the product of their surface and randomly generated number from 1 to 100), and the ability to transform (rectangle can transform to triangle such that it is halved by diagonal, and isosceles triangle is formed by merging two halves of a rectangle. Two triangles can be transformed in a rectangle only if they are right angled and have equal sides.). Robots of the shape of a triangle can fly, those of the shape of a circle can swim, and rest of them can walk and fly. According to this, they can be on a particular position in a 40 X 20 matrix. Shape bots have their enemies - Music bots, that can destroy Shape bots by singing. They can sing only if they are on the ground - otherwise they are automatically destroyed.
Simulation starts by creating Shape bots, two from each type (two triangles, rectangles, hexagons and circles) and they are randomly stored in the 40 X 20 matrix.
After that, position of each robot is displayed, their strenght, and what it currenly can do (fly, swim or walk).
Then they are attacked by four Music bots. They are randomly positioned, and can destroy all Shape bots that are on the distance of maximum 3 units by X and Y coordinates from them.
If all Shape bots are destroyed, simulation is terminated and the message "Music bots won." is displayed. Otherwise, simulation continues, remaining Shape bots are again arranged, and if they have the ability to transform, they transform, otherwise their strength is halved, and their positions are again displayed.
Music bots that are not destroyed are taking new positions, and attack again.
Simulation can end if:
1) all Music bots are destroyed (they are destroyed if they are on the territory that is not ground), and the message "Shape bots won. End of simulation." and positions of remaining Shape bots are displayed
2) all Shape bots are destroyed (the message "Music bots won." is displayed).

The village "Village" (matrix 40x20) is represented as:

My formal understanding of this problem is as follows:

1) We have a class - ShapeBots, that is inherited from classes: Triangle, Rectangle, Hexagon, Circle.
2) Class - MusicBots is the destructor of ShapeBots.
3) We have to create a matrix and use XYLayout concept.

Particularly, I don't understand how to implement the following:

1) dimensions (that are assigned during the creation of Shape bot)
2) strength (that is computed as the product of their surface and randomly generated number from 1 to 100)
Surface of a robot is not defined. How should we assume the surface?

3) transformation of shapes

4) Robots of the shape of a triangle can fly, those of the shape of a circle can swim, and rest of them can walk and fly. According to this, they can be on a particular position in a 40 X 20 matrix. Shape bots have their enemies - Music bots, that can destroy Shape bots by singing. They can sing only if they are on the ground - otherwise they are automatically destroyed.

5) use of XYLayout concept

Could someone please elaborate on this problem? I am not asking for full code, just the sketch of ideas and implementations.