public class Programmer extends Employee
Originated for CS161 in 2015
modified by garethhalladay on 9/21/17
Constructor | Description |
---|---|
Programmer(java.lang.String firstName,
java.lang.String lastName,
int averageLines) |
Explicitly invoke the Employee constructor.
|
Modifier and Type | Method | Description |
---|---|---|
int |
work() |
The programmer writes between 50% and 150% averageLinesOfCode each day (captured by
the corresponding instance variable in the Employee class).
|
getAverageLinesOfCode, getFirstName, getLastName, randomBetween, toString
public Programmer(java.lang.String firstName, java.lang.String lastName, int averageLines)
firstName
- First name of the programmerlastName
- Last name of the programmeraverageLines
- average lines of code that the programmer can program per daypublic int work()
Use the randomBetween method from the Employee class. This takes two arguments, the lower bound for the amount of code the programmer can write, and the upper bound for the amount of code the programmer can write.
work
in class Employee
Employee.randomBetween(double, double)