public class Project
extends java.lang.Object
Constructor | Description |
---|---|
Project(int linesOfCode,
int deadline,
int maxEmployees) |
Creates a new instance of a Project.
|
Project(int linesOfCode,
int deadline,
int maxEmployees,
long seed) |
Modifier and Type | Method | Description |
---|---|---|
void |
completeProject() |
Each day, so long as the project is not complete (while there are still lines of code to write or test)
add one day to the daysWorkedSoFar of the project (hint: check out the instance variables)
call each employee's work method.
|
int |
linesNeededPerDay() |
Helps assigns programmers and testers to the project.
|
static void |
main(java.lang.String[] args) |
|
java.lang.String |
toString() |
A string representation of a particular project.
|
public Project(int linesOfCode, int deadline, int maxEmployees) throws java.io.FileNotFoundException
linesOfCode
- lines of code needed for the projectdeadline
- how many days assigned to complete the projectmaxEmployees
- the maximum amount of employees you can assign to a projectjava.io.FileNotFoundException
- exception thrown if file is not foundpublic Project(int linesOfCode, int deadline, int maxEmployees, long seed) throws java.io.FileNotFoundException
linesOfCode
- lines of code needed for the projectdeadline
- how many days assigned to complete the projectmaxEmployees
- the maximum amount of employees you can assign to a projectseed
- allows us to have reproducible resultsjava.io.FileNotFoundException
- exception thrown if file is not foundpublic int linesNeededPerDay()
public void completeProject()
If you finish the recitation early: Change your code to ensure that the testers never test more code
than the programmers have coded. I have made this problem easier
by adding the programmers to the ArrayList
public java.lang.String toString()
Adding each employee to the string that you will return can be done in one of two ways:
Deadline: 15
Days required: 16
Employees on Project:
Programmer Carla Landon, average productivity: 140 lines
Programmer Carisa Belvin, average productivity: 131 lines
Programmer Laura Mccarty, average productivity: 113 lines
Tester Melisa Bucholz, average productivity: 80 lines
Tester Bernetta Reber, average productivity: 85 lines
Tester Tanisha Mckoy, average productivity: 81 lines
Tester Lorrie Coller, average productivity: 88 lines
toString
in class java.lang.Object
public static void main(java.lang.String[] args) throws java.io.FileNotFoundException
java.io.FileNotFoundException