There isn't a generic term that defines classes in relation to a particular student. Instead, we have names for each class in relation to how many years of school they have completed/have left.
In my neck of the woods, students in your example would be juniors and freshmen once school starts.
If this is talking about American college or high school students, traditionally graduation takes four school years. In your first year, you are called a freshman (or "frosh" at some schools), in the second year you are called a sophomore, in the third a junior, and in the fourth a senior. See this Wikipedia article for slightly more detail.
Schools here typically begin in the fall so that an academic year actually spans two calendar years, so those who enrolled in the fall of 2014* would be expected to graduate at the end of the 2017/18 school year. Since it's summer right now, they should have just completed their sophomore year and will be juniors when school starts again in the fall--over the summer they can be called "rising" juniors. Those who are enrolling now will be "incoming" freshmen. Once school actually starts in the fall, you could just say juniors and freshmen, without the "rising" and "incoming":
Hey, you know what? Juniors only had one
midterm test for their Calculus I last year, but we are going to have
three of them!
I heard professor B is planning to retire after this semester. I am
afraid freshmen won't have any
opportunities to take class with him.
You could also just say "third year students" and "first year students," respectively, or "the class of 2018" and "the class of 2020".
This makes your class, those students who enrolled in the fall of 2015, the sophomores, or second year students, or the class of 2019--students who have completed one year of school and are in their second year, with expected graduation after two more years (for a total of four years) in 2019.
If by "enrolled in 2014 or 2016" you mean "enrolled in the 2013/14 school year or 2015/16 school year" then the cohorts would be a year advanced, so seniors and sophomores, respectively.