Skip to content

Instantly share code, notes, and snippets.

Created April 24, 2013 14:47
Show Gist options
  • Save anonymous/5452699 to your computer and use it in GitHub Desktop.
Save anonymous/5452699 to your computer and use it in GitHub Desktop.
/*
* 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