Dogs jump when they are excited and want attention. While they mean no harm, they may accidentally hurt young children or the elderly. The quickest way to stop jumping is to teach another way to get attention from people while making sure they never get attention from people with jumping. You will need a helper for this exercise.
Mastery of this exercise will put your dog well on the way to earning the Canine Good Citizen title.
Always check in with your dog before letting someone pet them. Even the most friendly dog can have a bad day or get a bad vibe from someone and not want to be petted. Forcing them can set them up to make a costly mistake. Forced petting does not help shy dogs like strangers!