What happens when we have no students?

What should universities and colleges do when students don’t want to take our courses? What if no one wants a degree in German? What if Art History only attracts a handful of students? Do we shut down departments based on the ebb and flow of student interest? Or is there another way?