package lt.bit.personalas; public class Programuotojas implements Darbuotojas { private String name; private String surname; private int salary; public Programuotojas() { } public Programuotojas(String name, String surname, int salary) { this.name = name; this.surname = surname; this.salary = salary; } public void setName(String name) { this.name = name; } public void setSurname(String surname) { this.surname = surname; } public void setSalary(int salary) { this.salary = salary; } // PRIVALOMI METODAI PAGAL INTERFACE DARBUOTOJAS @Override public String getName() { return name; } @Override public String getSurname() { return surname; } @Override public int getSalary() { return salary; } public String toString(){ //Gražinsime vardą, pavardę ir apskaičiuotą atlyginimą return "Programuotojas: "+this.name+" "+this.surname+", Alga: "+this.getSalary(); } }