1package com.lowewriter.payroll;
2/** Represents an employee.
3 * @author Doug Lowe
4 * @author www.LoweWriter.com
5 * @version 1.5
6 * @since 1.0
7*/
8public class Employee
9{
10 private String lastName;
11 private String firstName;
12 private Double salary;
13/** Represents the employee’s address.
14*/
15 public Address address;
16/** Creates an employee with the specified name.
17 * @param lastName The employee’s last name.
18 * @param firstName The employee’s first name.
19*/
20 public Employee(String lastName, String firstName)
21 {
22 this.lastName = lastName;
23 this.firstName = firstName;
24 this.address = new Address();
25 }
26/** Gets the employee’s last name.
27 * @return A string representing the employee’s last
28 * name.
29*/
30 public String getLastName()
31 {
32 return this.lastName;
33 }
34/** Sets the employee’s last name.
35 * @param lastName A String containing the employee’s
36 * last name.
37*/
38 public void setLastName(String lastName)
39 {
40 this.lastName = lastName;
41 }
42/** Gets the employee’s first name.
43 * @return A string representing the employee’s first
44 * name.
45*/
46 public String getFirstName()
47 {
48 return this.firstName;
49 }
50/** Sets the employee’s first name.
51 * @param firstName A String containing the
52 * employee’s first name.
53*/
54 public void setFirstName(String firstName)
55 {
56 this.firstName = firstName;
57 }
58/** Gets the employee’s salary.
59 * @return A double representing the employee’s salary.
60*/
61 public double getSalary()
62 {
63 return this.salary;
64 }
65/** Sets the employee’s salary.
66 * @param lastName A double containing the employee’s
67 * salary.
68*/
69 public void setSalary(double salary)
70 {
71 this.salary = salary;
72 }
73}