This sounds like the battery to me. Often batteries that are failing will misreport remaining capacity, or be unable to output adequate current to support whatever function. This leads to these expected shutdowns, or random restarts. I would absiolutely replace the battery and if still nothing, we can look into some other causes.
Bear in mind Apple recommnends replacing the battery once 80% overall capacity has been reached.