1 25 26 package org.objectweb.speedo.pobjects.inheritance.prefetch; 27 28 31 public class Secretary extends AbstractAssistant { 32 33 private int numberOfProjects; 34 35 40 public Secretary(String name, double age, String company, int nbOfProjects) { 41 super(name, age, company, "secretary"); 42 this.numberOfProjects = nbOfProjects; 43 } 44 45 51 public Secretary(String name, double age, String company, String type, int nbOfProjects) { 52 super(name, age, company, type); 53 this.numberOfProjects = nbOfProjects; 54 } 55 56 57 public int getNumberOfProjects() { 58 return numberOfProjects; 59 } 60 61 public void setNumberOfProjects(int numberOfProjects) { 62 this.numberOfProjects = numberOfProjects; 63 } 64 65 public String toString() { 66 return "Secretary: Employee: name=" + name +", age=" + age + ", company=" + company + "nbOfProjects=" + numberOfProjects; 67 } 68 69 } 70 | Popular Tags |