We study many-to-one matching problems for assigning a set of students to a set of courses according to their preference lists in which they rank the agents from the other set. The agents can also rate several agents of the other set equally or exclude them. Our goal is to find a stable matching that maximizes students’ satisfaction using Integer Programming (IP) methods. The flexibility of these methods becomes apparent by introducing additional conditions on the type of students and/or on the minimum number of students that must attend a course for it to be offered.