Gravitational collapse of a radiating star