Created
January 21, 2016 19:06
-
-
Save AnatoliiStepaniuk/1f97eeef8089d292f0dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rubaka.students_arraylist; | |
public class Student | |
{ | |
private String firstName; | |
private String lastName; | |
private int age; | |
private double weight; | |
private char profession; | |
Student(){} | |
Student(String firstName, String lastName){ | |
this.firstName = firstName; | |
this.lastName = lastName; | |
} | |
public String getFirstName() | |
{ | |
return firstName; | |
} | |
public void setFirstName( String firstName ) | |
{ | |
this.firstName = firstName; | |
} | |
public String getLastName() | |
{ | |
return lastName; | |
} | |
public void setLastName( String lastName ) | |
{ | |
this.lastName = lastName; | |
} | |
public int getAge() | |
{ | |
return age; | |
} | |
public void setAge( int age ) | |
{ | |
this.age = age; | |
} | |
public double getWeight() | |
{ | |
return weight; | |
} | |
public void setWeight( double weight ) | |
{ | |
this.weight = weight; | |
} | |
public char getProfession() | |
{ | |
return profession; | |
} | |
public void setProfession( char profession ) | |
{ | |
this.profession = profession; | |
} | |
public String toString(){ | |
return firstName + " " + lastName + ", " + age + ", profession: " + profession + ", weight: " + weight; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment