Xbee remote control

s it not needed for the Leonardos?

That depends on which pins you are connecting the XBee to. On the Leonardo, pins 0 and 1 are connected to Serial1, not Serial. So, you can use Serial1 to talk to the XBee and Serial to talk to the PC.

Using Xbee series 2 on shields and my tutor has configured them

That doesn't tell us squat.

This is the only code i got and i guess will be the same for the sender and receiver?

I can't imagine why you think that.