1   /** 
2    * 183.592 Programmierpraxis TU Wien WS2014/15 H.Moritsch
3    * PersonNode-Beispiele
4    * basierend auf PP-Test PersonList/2012
5    */
6   public class Main {
7       
8       public static void main (String[] args) {
9           
10          PersonNode pn = null;
11  
12          pn = new PersonNode(new Student("Alice", "+4316543211", 1100040), pn);
13          pn = new PersonNode(new Student("Bob",   "+4316543212", 1100030), pn);
14          pn = new PersonNode(new Student("Mary",  "+4316543213", 1100020), pn);
15          pn = new PersonNode(new Person( "John",  "+4316543214"), pn);
16          pn = new PersonNode(new Student("Bill",  "+4316543215", 1100010), pn);
17          pn = new PersonNode(new Person( "Kate",  "+4316543216"), pn);
18          
19          pn.showIterative();
20  
21          pn.show();        
22  
23          // pn.showWithIndex(0);        
24  
25          System.out.println( pn.numberOfStudents() + " students");
26  
27          System.out.println( "node 3: " + pn.get(3) );
28  
29          System.out.println( "index of John: " + pn.indexOf("John") );
30          
31          System.out.println( "index of Hugo: " + pn.indexOf("Hugo") );
32          
33          System.out.println( "index of Mary: " + pn.indexOf("Mary") );
34          
35          System.out.println( "list of mat. numbers: " + pn.getMatnrList() );
36  
37      }
38      
39  }
40