Why does my 95 Nissan Maxima keep cutting off? on 1995 Nissan Maxima

My Maxima keeps cutting off and hesitating. There are no problems with the engine or battery. I've had a tune up and I've gotten the vacuum line fixed. It still cuts off. The mechanic said it may be the throttle position sensor. Does anyone know anything about a tps??

Asked by for the 1995 Nissan Maxima