Class ccj.Employee
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ccj.Employee

java.lang.Object
   |
   +----ccj.Employee

public class Employee
extends Object
implements Cloneable

Constructor Index

 o Employee(String, double)
Constructs an employee object

Method Index

 o clone()
Creates a copy of this object
 o equals(Object)
Tests if this object equals another
 o getName()
Gets the employee name
 o getSalary()
Gets the employee salary
 o setSalary(double)
Sets the employee salary
 o toString()
Creates a string representation of this object

Constructors

 o Employee
  public Employee(String n,
                  double s)
Constructs an employee object
Parameters:
n - the employee name
s - the employee salary

Methods

 o getName
  public String getName()
Gets the employee name
Returns:
the employee name
 o getSalary
  public double getSalary()
Gets the employee salary
Returns:
the employee salary
 o setSalary
  public void setSalary(double s)
Sets the employee salary
Parameters:
s - the new salary
 o equals
  public boolean equals(Object ob)
Tests if this object equals another
Parameters:
b - the object to compare with
Returns:
true if the two objects are equal
Overrides:
equals in class Object
 o toString
  public String toString()
Creates a string representation of this object
Returns:
a string representation of this object
Overrides:
toString in class Object
 o clone
  public Object clone()
Creates a copy of this object
Returns:
a copy of this object
Overrides:
clone in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index