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
-
Employee(String, double)
- Constructs an employee object
-
clone()
- Creates a copy of this object
-
equals(Object)
- Tests if this object equals another
-
getName()
- Gets the employee name
-
getSalary()
- Gets the employee salary
-
setSalary(double)
- Sets the employee salary
-
toString()
- Creates a string representation of this object
Employee
public Employee(String n,
double s)
- Constructs an employee object
- Parameters:
- n - the employee name
- s - the employee salary
getName
public String getName()
- Gets the employee name
- Returns:
- the employee name
getSalary
public double getSalary()
- Gets the employee salary
- Returns:
- the employee salary
setSalary
public void setSalary(double s)
- Sets the employee salary
- Parameters:
- s - the new salary
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
toString
public String toString()
- Creates a string representation of this object
- Returns:
- a string representation of this object
- Overrides:
- toString in class Object
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