/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2015 Andy Chong Chin Shin
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 *
 */

package com.sqatntu.metrics;

/**
 * Created by andyccs on 20/12/15.
 */
public class ScoreCalculator {
  public static float calculateScore(int value, int benchmark) {
    if (value <= benchmark) {
      return 100f;
    }
    return (((-2f / (3f * benchmark)) * value) + (5f / 3f)) * 100f;
  }
}

@@ -1373,17 +1373,55 @@
 f;%0A    %7D
-%0A
+ else if (value %3C= 4f * benchmark) %7B%0A  
     retu
@@ -1427,17 +1427,17 @@
 urn (((-
-2
+1
 f / (3f 
@@ -1462,17 +1462,17 @@
 lue) + (
-5
+4
 f / 3f))
@@ -1480,14 +1480,49 @@
 * 100f;%0A
+    %7D else %7B%0A      return 0;%0A    %7D%0A
   %7D%0A%7D%0A

change the equation to calculate score