Programmer
, Tester
public abstract class Employee
extends java.lang.Object
Originated for CS161 in 2015
modified by garethhalladay on 9/21/17
Constructor | Description |
---|---|
Employee(java.lang.String firstName,
java.lang.String lastName,
int averageLinesOfCode) |
Remember, objects from the abstract class cannot be instantiated.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getAverageLinesOfCode() |
Returns the average number of lines of code an employee can write or test.
|
java.lang.String |
getFirstName() |
Returns the first name of the employee.
|
java.lang.String |
getLastName() |
Returns the last name of the employee.
|
int |
randomBetween(double lower,
double upper) |
A helper method to return a random whole number inclusively between two bounds.
|
java.lang.String |
toString() |
A string representation of an employee.
|
abstract int |
work() |
The amount of work an employee does each day.
|
public Employee(java.lang.String firstName, java.lang.String lastName, int averageLinesOfCode)
firstName
- the first name of the employeelastName
- the last name of the employeeaverageLinesOfCode
- lines of code the employee can program or testpublic java.lang.String getFirstName()
public java.lang.String getLastName()
public int getAverageLinesOfCode()
public java.lang.String toString()
Examples:
Programmer Dani Durand, average productivity: 101 lines
Tester Fransisca Ettinger, average productivity: 80 lines
toString
in class java.lang.Object
public abstract int work()
public int randomBetween(double lower, double upper)
lower
- lower limitupper
- upper limit