KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > speedo > pobjects > inheritance > horizontal > Worker


1 /**
2  * Copyright (C) 2001-2004 France Telecom R&D
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18 package org.objectweb.speedo.pobjects.inheritance.horizontal;
19
20 import java.util.Date JavaDoc;
21
22 /**
23  *
24  * @author S.Chassande-Barrioz
25  */

26 public class Worker extends Person {
27
28     private String JavaDoc company;
29     private float salary;
30
31     public Worker() {
32     }
33
34     public Worker(String JavaDoc firstname,
35                   String JavaDoc lastname,
36                   Address address,
37                   Date JavaDoc birthdate,
38                   String JavaDoc jobName,
39                   String JavaDoc 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 JavaDoc getCompany() {
48         return company;
49     }
50
51     public void setCompany(String JavaDoc 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