Skip to content

Commit

Permalink
added PTI calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
will2312 committed Mar 11, 2021
1 parent ffc61fb commit cf698ff
Showing 1 changed file with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.sf.stormwaterutilityandroid.WaterWay;

public class PTI {
private double BM_intolerant = 0;
private double BM_moderately_tolerant = 0;
private double BM_fairly_tolerant = 0;
private double BM_very_tolerant = 0;

PTI(double BM_intolerant, double BM_moderately_tolerant, double BM_fairly_tolerant, double BM_very_tolerant) {
this.BM_intolerant = BM_intolerant;
this.BM_moderately_tolerant = BM_moderately_tolerant;
this.BM_fairly_tolerant = BM_fairly_tolerant;
this.BM_very_tolerant = BM_very_tolerant;
}

public void setBM_intolerant(double value) {
BM_intolerant = value;
}

public void setBM_moderately_tolerant(double value) {
BM_moderately_tolerant = value;
}

public void setBM_fairly_tolerant(double value) {
BM_fairly_tolerant = value;
}

public void setBM_very_tolerant(double value) {
BM_very_tolerant = value;
}

public double calculatePTI() {
return 4.0 * BM_intolerant + 3.0 * BM_moderately_tolerant + 2.0 * BM_fairly_tolerant + 1.0 * BM_very_tolerant;
}

public static double getPTI(double intolerant, double moderate, double fairly, double very) {
return 4.0 * intolerant + 3.0 * moderate + 2.0 * fairly + 1.0 * very;
}
}

0 comments on commit cf698ff

Please sign in to comment.