1 18 package org.objectweb.speedo.pobjects.inheritance.horizontal; 19 20 import java.util.Date ; 21 22 26 public class Worker extends Person { 27 28 private String company; 29 private float salary; 30 31 public Worker() { 32 } 33 34 public Worker(String firstname, 35 String lastname, 36 Address address, 37 Date birthdate, 38 String jobName, 39 String company, 40 float salary) { 41 super(firstname, lastname, address, birthdate, jobName); 42 this.company = company; 43 this.salary = salary; 44 } 45 46 47 public String getCompany() { 48 return company; 49 } 50 51 public void setCompany(String company) { 52 this.company = company; 53 } 54 55 public float getSalary() { 56 return salary; 57 } 58 59 public void setSalary(float salary) { 60 this.salary = salary; 61 } 62 } 63 | Popular Tags |