Oh, almost any bike can do it all, especially with a strong rider... But it might not necessarily do it as well as a bike that was designed for it....
I'd suggest you don't go mountain biking with your fx.
Of course I could be zippier on the roads or whatnot, but overdrawing my bank account or spending my student loans on a road bike instead of tuition wouldn't exactly be prudent.
and I didn't have mountain biking in mind when I said that!