{"size": 1445, "ext": "js", "max_stars_repo_path": "assets/js/calculation.js", "max_stars_repo_name": "Femme-js/cocomo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "assets/js/calculation.js", "max_issues_repo_name": "Femme-js/cocomo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "assets/js/calculation.js", "max_forks_repo_name": "Femme-js/cocomo", "max_forks_repo_forks_event_min_datetime": "2019-12-17T08:25:04.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-24T16:52:38.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 38.0263157895, "max_line_length": 116, "alphanum_fraction": 0.5121107266}
$(function(){
    $('.submit').click(function() {
      let sum = 0;
      let eas = 1;
      let a = 2.94;
      let c = 3.67;
      let d = 0.28;

      $('.scale-driver').each(function(i){
        sum += Number(this.value);
        console.log(sum);
      });

      $('.cost-driver').each(function(i) {
        eas *= Number(this.value);
        console.log(eas);
      });

      let e = 0.91 + ((0.01)*sum);
      let kloc = $('.kloc').val();
      let cost = $('.cost').val();
      let effort = a*(Math.pow(kloc, e));
      let time = c*(Math.pow(effort, d));
      let tcost = cost*effort;
      $( "<div class=\"container-fluid bg-3 text-center input-group mb-3\">\n" +
          "<input  id='effort' class=\"form-control\" type=\"text\" placeholder=\"Effort:\" readonly>\n" +
          "</div>" + "<div class=\"container-fluid bg-3 text-center input-group mb-3\">\n" +
          "<input id='time' class=\"form-control\" type=\"text\" placeholder=\"Time of Development:\" readonly>\n" +
          "</div>" + "<div class=\"container-fluid bg-3 text-center input-group mb-3\">\n" +
          "<input id='tcost' class=\"form-control\" type=\"text\" placeholder=\"Total Cost:\" readonly>\n" +
          "</div><br><br>" ).insertBefore( ".footer" );
      $("#effort").val('Effort: ' + effort + ' Person-Month');
      $("#time").val('Time of development: ' + time + ' Months');
      $("#tcost").val('Total cost: $' + tcost);
    });

});
