Story of my life.
To update, they set a meeting with the professor to clear the air. In the end, the professor told John to stop feeling down. He said that there will be no special treatment and suggested online resources for John to read and learn from. At least...
If it were my son, I would make his butt finish the course.
This is more a social matter than anything else. Once he enters a career then it will likely worsen if he cannot learn to deal. The best support you could offer him is to set up a life coach that teaches him how to deal with people like this from the get-go. His Dad may agree to you taking him for coaching. And he might be more comfortable with a life coach (with experience dealing with high-functioning autism if he does have it) instead of traditional counseling or therapy.
Yes, the Professor is human too and has a right to be a little hard with the entire class and be himself. But singling out one or a few students is wrong, as humiliation is incredibly disrespectful in a group. This should have been addressed privately.
If your friend's son does deal with high-functioning austism, I can relate as my own stbx-husband has social issues (Aspergers). The problem in this case may be that he has no prior established rules for the situation. This can cause them to go berserk in stressful and new situations. To help him, sit down and write rules for those situations. They strive for ultimate competency in their domains of interest and career, so may be sensitive to others picking out shortcomings. He has to finish this course as a personal learning experience, as once an Aspie has their mind set they are difficult to influence and have iron-strong willpower in their belief system. They have many great impressive strengths that often make them the best at what they do, don't let the autistic label fool you, their competency in career and few interests are often unsurpassed by neurotypical people. It's the social aspect that gets them, they don't gather enough rules for social situations because they don't deal with those problems fully, they'll do something like not go to class or drop the course instead of dealing with it. And end up not learning a required rule to deal with it the next time they face a similar situation.
I believe that anything between two people is about playing catch. Both of them have to throw the ball good and also have to catch the ball good. As far as I can see from what I've read in this thread, both the professor and the student aren't very good at doing either of that. I believe that the student and the professor should have some private time together with another neutral and fair person watching over them so they can sort things out. If that doesn't work out, then nothing ever will so the student is left it two options: don't take the class or take the class and ignore what the professor says. Of course if it is a mandatory credit, then all he can do is the latter and wait for the term to end and hope that he won't breakdown mentally.
Personally speaking, the professor lacks professionalism. Public humiliation is something you should never do.
Speak with the school administrators and let them be the mediator.
Separate names with a comma.