A speech class has $4$ freshmen and $3$ sophomores. (Everyone is distinguishable.) In how many ways can they stand in line, so that all of the freshmen are standing next to each other?

You can count the 4 freshmans as one group, call it x. so the total ways to arrange 3 sophomores and x is 4! which is 24. Multiply by 4! because the freshmans can stand in different orders next to each other, 4! different ways. so 4!x4!=576