Tennis superstar Roger Federer has announced that he is retiring from competitive play after his last tournament next week.