-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResourceObject.cs
More file actions
43 lines (42 loc) · 1.2 KB
/
ResourceObject.cs
File metadata and controls
43 lines (42 loc) · 1.2 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
37
38
39
40
41
42
43
namespace Xunit.Gherkin.PilotProject
{
public class ResourceObject
{
double useEventValue;
int frequency;
int occurrence;
public double useEventPeriodValue;
public ResourceObject(double useEventValue, int occurrence, int frequency)
{
this.useEventValue = useEventValue;
this.occurrence = occurrence;
this.frequency = frequency;
}
public ResourceObject()
{
this.useEventValue = 0;
this.occurrence = 0;
this.frequency = 0;
}
public void SetUseEventValue(double useEventValue)
{
this.useEventValue = useEventValue;
}
public void SetOccurrence(int occurrence)
{
this.occurrence = occurrence;
}
public void SetFrequency(int frequency)
{
this.frequency = frequency;
}
public double CalcUseEventPeriod()
{
return useEventPeriodValue = (useEventValue * occurrence) / frequency;
}
public double CalcReportTotal(int numberOfPeriods)
{
return useEventPeriodValue * numberOfPeriods;
}
}
}