My dilemma: I'm interested in potentially going to graduate school to obtain my PhD in math with an ideal career as a professor at a research university. I entered undergrad as a computer engineer and didn't add a math major until the end of my third semester. In my school, you have to select electives to satisy an "elective focus area" (cohesive plans of study in fields such as data mining, signal processing, applied physics, etc). My field of study is currently software engineering, something that still interests me. I'm still early enough in my undergraduate career (going into my fifth semester) where I could alter my focus area to include many more upper-level and graduate math courses instead of continuing on the software track. However, I'm hesitant to do so because I know that software engineering is a lucrative field with significantly more job availability than math academia and I would likely enjoy my work as a software engineer.
My inclination: Given that software engineering is something that I'm interested in (although not as much as math) and the job market isn't quite as cutthroat, I'm inclined to continue on my path while trying to sneak in a couple upper-level math courses that have crossover -- large data analysis, numerical methods -- where I can. I could work in industry for a few years after graduating. Ideally, I would be able to take one or two courses a year throughout this period, most likely online, that would solidify my mathematical background and make me a more desirable student when applying for grad schools.
My question(s): Would taking a solid portion of my post-calculus mathematics coursework online have any adverse affect on my graduate admissions? Would it matter if the coursework came from my undergraduate university or from a variety of institutions? Are there other unconsidered obstacles in my inclined path?