Upset by male classmates openly comparing female students according to physical appearance
You don't say where you're going to school but if it's here in the US, I would report the problem to the university and demand they do whatever is necessary to fix it.  Title IX requires them to provide an inclusive environment free of sexual harassment.  If you are unsatisfied by their response, I would report the school to the U.S. Department of Education’s Office of Civil Rights.  You'll find additional helpful advice here at equalrights.org.

Added:  Several comments express concern that reporting the harassment might result in retaliation.  But it's worth noting that retaliation for filing a harassment complaint is also against the law and cause for a new complaint.  The school has to do whatever it takes to fix this, even if means expelling the perpetrators.  It is not sufficient for them to claim they did the best they could.

Still more:  Having conducted some other disciplinary actions, even if not any that were exactly like the one described here, I would expect the result of complaining to the university is that the Title IX conduct officer will call the students to a meeting that might go something like this:  You start by asking the students if they know why they're there.  After the usual squirmy they-can't-think-of-anything denials, you describe their offensive behavior and ask if the reason they can't remember any of this is because they think it's such completely ordinary behavior.  You point out that in a workplace, it would get them fired and might subject the company to a lawsuit and an expensive settlement.  You explain that university has an obligation under Title IX to maintain an inclusive environment free of sexual harassment.

You then ask, "Do you think you should be allowed to stay at the university?"  Typically, the students' lives flash before their eyes as they realize the seriousness of the stakes and they decide they will never do this again.  There are lots of ways to make this even more, ahem, memorable, e.g., by asking if they have a backup career in mind if this computer science thing doesn't work out or by making them wait a few extra days to hear the disposition of their case (especially if you expect to let them off lightly).  It may seem a little like pulling the wings off flies, but trust me, the problem behavior will end, hopefully for the entire rest of their lives, in which case they will have learned something far more valuable than yet another algorithm.