There are a total of 51 students in the Modern Dance and Ballet classes. The Modern Dance class has twice as many students as the Ballet class. Write a system of linear equations that represent this situation. How many students are in each class?