Exact model for a relativistic star