Question: how do you know if its the battery or the alternator?
Answer: If the engine starts but dies immediately, your alternator probably isn't keeping your battery charged. If a jump starts and keeps your car running, but the car can't start again off of its own power, a dead battery is likely your answer.