The problem can be solved using combinations. We need to choose 2 freshmen from 7, 3 sophomores from 8, 4 juniors from 7, and 5 seniors from 7. The number of ways to do this is:
C(7,2) * C(8,3) * C(7,4) * C(7,5) = 21 * 56 * 35 * 21 = 2,756,040.
Therefore, there are 2,756,040 ways to form the dance committee.