About a year ago our 15 year old electric water heater heated the water nearly to the boiling point until the breaker on the tank shut off the power. When I reset the breaker the temperature went back to normal. However, the tank has periodically had the the problem until recently when the temperature would no longer go back to normal. We replaced both thermostats but the problem has not been fixed. Is there another part that might be causing the problem?
15 years old, "heated the water nearly to the boiling point", and breaker tripping would tend to point to the bottom heating element in the tank becoming buried in sediment. Higher water temperatures accelerate sediment formation, and after all of the available surfaces become scaled with deposits, it is free to settle to the bottom of the tank. When it buries the bottom element, it impacts the heat transfer ability of the heating element (which means lower output temperatures and overloading on the circuit breaker).
The first thing that I would do would be to drain the tank and de-scale it according to the manufacturer's instructions. If you have particularly hard water in your area, this should be done at least every couple of years.