...so now it is your friend in a Master's Program who can't figure this out? Either your friend spent way to much time getting drunk and then forgot about learning material and time management, and considering he is in a master's program I hope he gets dropped. At that level you have to have time management skills.
Or he completely cheated through his undergrad and then found out this stuff is a lot more difficult, and in that scenario I still hope he gets dropped.
I'm thinking maybe the latter...all my ICS friends last year wait till the absolute last minute to learn ANYTHING, and then they would spent up all night drinking red bulls and coffee figuring their homework and they would ALWAYS finish it. They can't do that anymore considering upper division is a lot harder, so they delay it to the last three days and then code like crazy from start to finish. My point is though: they know how to code. It is the same with most ICS majors I know~ you maybe a lazy ass but in that last few minutes you will get that work done.
Your friend however clearly displays a lack of ability to learn the material.
Whatever, whether it is your friend who is working on a MASTER'S THESIS needs this, or you because, "hil programmers please help me out , tommorow is the day i have to submit at MIT university australia . give your mail ids i wil send the files ." I'm not sure nor do I care. All I know is that your friend cannot continue to do this, because when he gets out and eventually gets a job people will stick more strict time limits...he will quickly find that he got screwed by not doing anything on his own