I'm going to get angry at my friend for complaining
Why does this make you angry?
He whines nonstop like a little bitch
It can be difficult dealing with a friend who complains a lot, but friends are expected to support one another during times of difficulty. If you ignore their needs the friendship may suffer.
He should get better at accepting my judgements. I know it will make him feel better.
Being a good friend doesn't mean trying to solve their problems with whatever way you think is best. Whats best for you may not be what is best for them. Try to help them tackle their issues from their point of view.