-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCostVariance.java
More file actions
36 lines (28 loc) · 1.25 KB
/
CostVariance.java
File metadata and controls
36 lines (28 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package Git.MiniProject;
public class CostVariance extends Finance {
private double actualCost;
public CostVariance(double budget, double earnedValue, double projectDuration, double daysPassed, double actualCost, String projectId) {
super(budget, earnedValue, projectDuration, daysPassed, projectId);
this.actualCost = actualCost;
}
public double getCostVariance() {
double costVariance;
costVariance = getEarnedValue() - this.actualCost;
return costVariance;
}
public double getActualCost() {
return actualCost;
}
public void setActualCost(double actualCost) {
this.actualCost = actualCost;
}
public String toString() {
String costString;
costString ="Project ID: " +getProjectId()+System.lineSeparator();
costString +=""+System.lineSeparator();
costString +="========COST VARIANCE========="+System.lineSeparator();
costString +="______________________________"+System.lineSeparator();
costString +=" "+ getCostVariance() +" SEK "+System.lineSeparator();
costString +="______________________________"+System.lineSeparator();
return costString;}
}