Created
April 24, 2013 14:47
-
-
Save anonymous/5452699 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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package bikeshop; | |
import java.util.ArrayList; | |
public class Employee { | |
private String name; | |
private String rodneCislo; | |
private int oddelenie; | |
public Employee(String name, String rodneCislo, int oddelenie){ | |
this.name = name; | |
this.rodneCislo = rodneCislo; | |
this.oddelenie = oddelenie; | |
} | |
public void vypis() { | |
System.out.println("name: " + this.name + " rodnecislo: " + this.rodneCislo + " oddelenie: " + this.oddelenie); | |
} | |
//getter and setter | |
public String getName() { | |
return name; | |
} | |
public void setName(String name) { | |
this.name = name; | |
} | |
public String getRodneCislo() { | |
return rodneCislo; | |
} | |
public void setRodneCislo(String rodneCislo) { | |
this.rodneCislo = rodneCislo; | |
} | |
public int getOddelenie() { | |
return oddelenie; | |
} | |
public void setOddelenie(int oddelenie) { | |
this.oddelenie = oddelenie; | |
} | |
//end of getter and setter | |
public boolean equals(Employee e) { | |
if (this.rodneCislo.equals(getRodneCislo()) ) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment