I agree that a student would usually talk about a good or bad class, a class that he or she does or doesn't particularly like. For example, they might say that fourth-year English is a hard class because it has so much Shakespeare in it, or that first-year biology is a fun class because they get to dissect frogs.
If it's not just a particular year or group, the student might like or dislike the subject, not just the particular class. For instance, some students like math, while others like history.
In the second sentence, where the teacher seems to be addressing the students, I would also use 'class,' or else possibly 'group,' 'bunch,' etc. Yes, a class in the sense of a group of students can have a reputation for being particularly good, smart, nice -- or also particularly bad, lazy, hard to manage, etc.
'Course,' in contrast, has to do with the content, the material covered. If a class has a specific topic or title beyond just the broad subject, it could also be called a course. For example, 'Conservation biology,' or 'Poetry of the World Wars,' or 'Technology and graphic design' -- for that you could say it's a really interesting / good / worthwhile course. But as mentioned, courses on specific topics tend to be more common at the college / university level than in high school.