You're correct in assuming that most textbook examples are single classes for simplicity. In the real world, even the simplest programs will have dozens of classes, and applications of any substance can easily have many thousands of classes.
In general, you'll want fairly complete separation between computation and the GUI, for a number of reasons ranging from ease of modification to ease of
testing.