I'm working on a project with a partner that involves developing a mobile app and corresponding server. I won't bother with the specifics, but both involve a fair amount of work (both require some custom algorithms as well as thousands of lines of code). This project will serve as a final for one of our classes.
Originally, we agreed that I would write the server and he would write the mobile application. I stayed up for a couple nights straight and got together a working server in no time. He told me he was bogged down with papers/family life/etc., but he'd handle the client side.
About two weeks went by and still no progress had been made. I had some free time so I figured out how the app needs to be written (i.e. writing out the pseudocode and sketching wireframes). When another week went by and still no work had been done, I went ahead and wrote a good deal of the client code. My partner is also my friend and I trusted him when he told me he would do his part and he was just totally bogged down.
Now the project is due on Friday and I'm still the only one who's actually done anything. I find out today that he still has yet to write a single line of code because he's so busy (but not so busy that he couldn't go to a baseball game, a concert, and spend all of Friday night getting drunk).
I'm not sure how I want to approach the situation. Even if my partner finished the project on his own, I've still done 80%. I don't think its fair if he gets an A because I killed myself to do the work of two people. At the same time, if I tell the professor how little he's done, the professor will fail him (rightly so) and I will lose a friend.
How can I get the credit I deserve for my work without losing my friend? I feel like I have the Hobson's choice between getting credit for my work and keeping a friend.
EDIT: I did choose a specific answer as my accepted answer, but all of these answers are of really good quality. If you're having a problem similar to mine, I highly suggest reading through all of the answers here.