//******************************************************************** // Student.java Author: Lewis/Loftus // // Represents a college student. //******************************************************************** public class Student { private String firstName, lastName; private int year; //----------------------------------------------------------------- // Constructor: Sets up this student with the specified values. //----------------------------------------------------------------- public Student (String first, String last, int yr) { firstName = first; lastName = last; year = yr; } //----------------------------------------------------------------- // Returns a string description of this Student object. //----------------------------------------------------------------- public String toString() { String result; result = firstName + " " + lastName + "\n"; result += "Years of study: " + year; return result; } }