Answer :
The answer is 435 handshakes when everyone was finished. I hope this is correct.
Let's pick one person at random and call it the 'first'.
That person shakes hands with 29 other classmates.
Take another person different from the first, we'll call him the 'second'. Since he has already shaken hands with the first, he shakes hands with 28 other classmates.
The 'third' person will likewise shake hands with 27 other classmates, and so on.
Hence, the total number of handshakes is 29+28+27+...+2+1 = 29*30/2=435 handshakes
That person shakes hands with 29 other classmates.
Take another person different from the first, we'll call him the 'second'. Since he has already shaken hands with the first, he shakes hands with 28 other classmates.
The 'third' person will likewise shake hands with 27 other classmates, and so on.
Hence, the total number of handshakes is 29+28+27+...+2+1 = 29*30/2=435 handshakes