Check all the connections. Sometimes the ends of the battery cable are corroded where they connect to the starter and engine. Switch itself could be bad. Try the starter either by shorting across the terminal on the solenoid or run a jumper wire to the solenoid and try starting it several times in a row. If it works that means the starter is probably alright and it is in the wiring somewhere. Try the same thing with the switch. Short across the wires at the switch and if the starter seems to work each time, it may well be the switch. The contacts in the switch may be getting burned and not making good contact.
Try the cables from your battery and alt. Sometimes these can corrode.
The computer only resets when the battery is removed. The alternator just charges the battery, so if the battery is left connected when the alternator is replaced, the computer should not reset.
Alternator
did you check the alternator??
Inside the alternator
Voltage regulator or loose wire.
Check the battery cables or starter.
Alternator is not charging. Have it tested and/or replaced.
You can have the alternator tested free of charge at just about any major auto parts store. By the way, a bad alternator will not "discharge" a battery - the alternator's function is to provide the charge to the battery. If the alternator is faulty, then it is not providing the charge necessary to keep other components from discharging the battery. I had the alternator tested and it was charging. If the alternator has a bad diode, it will discharge the battery. I replaced the alternator and everything is fine.
It could be an alternator. Check with a mechanic if that is the issue.
Voltage Regulator?
defective alternator