Consequences of not attending a conference
I suggest that you go and make the best use of the time, both at the conference and otherwise. You have a long plane ride in both directions. You have evenings if you forgo socializing. You have time between sessions to review course material if you have some notes on index cards or otherwise that are easy to carry. 

You might even be successful in begging to put off the exam(s) for a day or so. 

And, as others have said, if you have had a paper accepted then you have an obligation to present it. Making your advisor happy is worth something also. 

And remember that in the last analysis, for moving on to grad school, more than your grades will be considered. Most especially letters from your advisor.