All pastes #460248 Raw Edit

Student.java

public text v1 · immutable
#460248 ·published 2007-04-26 23:13 UTC
rendered paste body
/* File Name: Student.java
 *
 * Purpose: Represents a signle student
 *
 * Name: Haresh Modha
 *
 * Instructor: Leonidas Deligiannidis, Ph.D.
 */
 
 public class Student
 {
 	private String firstName;
 	private String lastName;
 	private String DOB;
 	private String ID;
 	private String accept;
 	private String street;
 	private String city;
 	private String state;
 	private String zip;
 	private String country;
 	
 	/*
 	 *  Sets up the new student
 	 */
 	public Student (String first, String last, String dob, String id, String Acceptance, String st, String town, String State, String code, String ct)
 	{
 		firstName = first;
 		lastName = last;
 		DOB = dob;
 		ID = id;
 		accept = Acceptance;
 		street = st;
 		city = town;
 		state = State;
 		zip = code;
 		country = ct;
 	}
 	
 	/*
 	 *  Returns this student information as a string
 	 */
 	public String toString ()
 	{
 		String result = "";
 		
 		result += "First Name:\t\t\t\t" + firstName + "\n";
 		result += "Last Name:\t\t\t\t" + lastName + "\n";
 		result += "Date of Birth:\t\t\t" + DOB + "\n";
 		result += "ID:\t\t\t\t\t\t" + ID + "\n";
 		result += "Acceptance Date:\t\t" + accept + "\n";
		result += "Street:\t\t\t\t\t" + street + "\n";
		result += "City:\t\t\t\t\t" + city + "\n";
		result += "State:\t\t\t\t\t" + state + "\n";
		result += "ZIP:\t\t\t\t\t" + zip + "\n";
		result += "Country:\t\t\t\t" + country + "\n";
 		
 		return result;
 	}
 }