Alternator converts power from the petrol engine to electrical energy.
That is to keep the battery fully charged.
Is your alternator really bad?
Very often the alternator fails in stages and you can go a long time on a limping alternator.
Before recommending a new alternator we perform these tests: