I would like to draw an array of robots. How do i complete this class to draw the head, body, legs of a robot given that the robot is to be drawn within an invisible rectangular Container. The position and dimensions of the
Container are given as parameters to the constructor. The width and height of the
robot’s triangular “head” = the width of the Container. The width of the robot’s “body”
is the same as the width of the head at its widest point. The height of the head, body, and
“legs” sum to the given height of the Container,with the height of the body being equal
to the height of the legs. The width of the base of each leg is 1/4 of the width of the body.
Using the given Triangle and Rectangle classes. This is what i have so far but i odnt know how to get the head, body, legs of the robot.
private Triangle head;
private Rectangle body, leg1, leg 2;
public Suspect(int xpos, int ypos, int width, int height) {
super();
this.setBounds(xpos, ypos, width, height);
int head_width = width;
int head_height = head_width;
int xc = width/2;
int yc = width/2;
head = new Triangle(xc,yc, , width, width);
body = new Rectangle();
leg1=new Rectangle();
leg2=new Triangle();
kindly help me