- (void)makeStudents
{
  NSArray *names = [[NSArray alloc] initWithObjects:@"Josh", @"Ryan", 
                    @"Sarah", @"Frank", @"Sam", @"Emanne", @"Steve", 
                    @"Jon", @"Justin", @"Phil", @"James", @"Catie", 
                    @"Joan", @"Zack", @"Ashley", @"Neil", @"Kevin", 
                    @"Nick", @"Eric", @"Brandon", @"Chloe", @"Andrew", 
                    @"Elliot", @"Doug", nil];
  NSArray *majors = [[NSArray alloc] initWithObjects:@"Computer Science", 
                    @"Math", @"Biology", @"Chemistry", @"Physics", 
                    @"Engineering", @"Psychology", @"Linguistics", 
                    @"Economics", @"History", @"Political Science", 
                    @"Philosophy", @"English", @"Theater", @"Education", nil];
  
  Student *student;
  for (int i = 0; i < 50; i++) {
    student = [NSEntityDescription insertNewObjectForEntityForName:@"Student"
                        inManagedObjectContext:self.managedObjectContext];
    student.name = [names objectAtIndex:arc4random() % names.count];

    NSString *deptName = [majors objectAtIndex:arc4random() % majors.count];
    Department *department = [Department departmentWithName:deptName 
                     inManagedObjectContext:self.managedObjectContext];
    student.majorDepartment = department;
    student.gradYear = [NSNumber numberWithInt:1900 + arc4random() % 115];
  }
  [self saveContext];
}
