Question Computer stopping and turning off randomly


Dec 5, 2015
(I have seen a lot of threads like this around here, and I'm trying to post this as quickly as I can before my computer shuts off again!...)
Hello all,
I'm having a bit of a problem with my computer. Since last week, my computer has randomly shut off more than once; I was waking up my computer out of sleep mode and got the "Windows did not shut down successfully..." message the first time; next, I was waking up my computer again and it shut down right after I pressed the Power button, and most recently, it shut off while I was working. What exacty could be causing this? Last week alone I've had to replace the hard drive and the CPU fan. (I read elsewhere that a bad CPU fan or overheating components can cause a computer to shut down out of nowhere, so I know that's not the problem) This week my computer shutting off at the most inconvenient of times-- it shut off a few times while I was in a lecture!
I have run tests on it (memory, hard drive, battery, etc) and everything is coming back as "OK" or "Pass".
Could this problem be easily fixed, or is my computer on its way out already?
My computer is an EliteBook 8470p and I am currently running Windows 7 (32-bit).
Thanks in advance.