Defined a method for printing student names from my array