package is_a_relationship;

import java.util.ArrayList;

public class UniversityTest {

	public static void main(String[] args) {
		ArrayList<Person> persons = new ArrayList<Person>();
		
		Person p1 = new Person("person1", 1);
		Person p2 = new Person("person2", 1);
		Person p3 = new Person("person3", 1);
		Person p4 = new Person("person4", 1);
		Person p5 = new Person("person5", 1);
		
		Student s1 = new Student("student1", 1);
		Student s2 = new Student("student2", 2);
		Student s3 = new Student("student3", 3);
		Student s4 = new Student("student4", 4);
		Student s5 = new Student("student5", 5);
		
		Teacher t1 = new Teacher("teacher1", 11);
		Teacher t2 = new Teacher("teacher2", 22);
		Teacher t3 = new Teacher("teacher3", 33);
		Teacher t4 = new Teacher("teacher4", 44);
		Teacher t5 = new Teacher("teacher5", 55);
		
		persons.add(s1);
		persons.add(s2);
		persons.add(s3);
		persons.add(s4);
		persons.add(s5);
		
		persons.add(t1);
		persons.add(t2);
		persons.add(t3);
		persons.add(t4);
		persons.add(t5);
		
		persons.add(p1);
		persons.add(p2);
		persons.add(p3);
		persons.add(p4);
		persons.add(p5);
		
		for (Person p : persons) {
			System.out.println(p +  " role: " + p.getRole());			
		}
	}
}