Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

It must be use Java program NFL Quarterback Rating Formula The NFL rates its pas

ID: 3853075 • Letter: I

Question

It must be use Java program

NFL Quarterback Rating Formula The NFL rates its passers for stat stical purposes against a fixed performance standard based on statistical in a total group The current system, which was adopted in 1973, removes inequities that existed in the former method and, at the achievements of all qualified pro passers since 1960. The current system replaced one that rated passers in relation to their based on various criteria. same time, provides a means of comparing passing performances from one season to the next. It is important to remember that the system is used to rate passers, not quarterbacks. Statstics do not reflect leadership, play-calling, and other intangible factors that go into making a successful professional quarterback Four categories are used as a basis for compiling a rating: Percentage of completions per attempt 2. Average yards gained per attempt .3. Percentage of touchdown passes per attempt A. Percentage of interceptions per attempt The average standad is 1.000. The bottom is .000. To earn a 2.000 rating, a passer must perform at exceptional levels, i.e., 70 percent in completions, 10 percent in touchdowns, 1.5 percent in interceptions, and 11 yards average gain per pass attempt. The maximum a passer can receive in any category is 2.375 (see examples at the end of the program). In order to make the rating more understandable, the point rating is then converted into a scale of 100. In rare cases, where statistical performance has been superior, it is possible for a passer to surpass a 100 rating. For example, take Steve Young's record-setting season in 1994 when he completed 324 of 461 passes for 3,969 yards, 35 touchdowns, and 10 interceptions. The four calculations would be: Percentage of Completions 324 of 461 is 70.28 percent. Subtract 30 from the completion percentage (40.28) and multiply the result by 0.05. The result is a point rating of 2.014 Note: If the result is less than zero (Comp. Pct. less than 30.0), award zero points. If the results are greater than 2.375 Average Yards Gained Per Attempt-3,969 yards divided by 461 attempts is 8.61. Subtract three yards from yards-per- attempt (5.61) and multiply the result by 0.25. The result is 1.403. Note: If the result is less than zero (yards per attempt less than 3.0), award zero points·tthe.esultsgester than2.aza Percentage of Touchdown Passes-35 touchdowns in 461 attempts is 7.59 percent. Multiply the touchdown percentage by 0.2. The result is 1.518. Note: If the result is greater than 2.375 (touchdown percentage greater than 11.875), award 2.375. Percentage of Interceptions 10 interceptions in 461 attempts is 2.17 percent. Multiply the interception percentage by 0.25 (0.542) and subtract the number from 2.375. The result is 1.833. Note: If the result is less than zero (interception percentage greater than 9.5), award zero points. The sum of the four steps is (2.014+1.4031.518 1.833) 6.768. The sum is then divided by six (1.128) and multiplied by 100. In this case, the result is 112.8. This same formula can be used to determine a passer rating for any player who attempts at least one pass.

Explanation / Answer

Here is the completed code for the question. Post a comment if any issues, I shall respond. If the answer helped, please rate it. Thank you.

import java.util.Scanner;

public class QuarterbackRating {

  

   private static double percentComplete(int completed , int attempts)

   {

       double perc = completed * 100.0 / attempts;

       perc = (perc - 30) * 0.05;

       if(perc < 0)

           perc = 0;

       else if(perc > 2.375)

           perc = 2.375;

       return perc;

   }

  

   private static double avgYards(int yards, int attempts)

   {

       double avg = yards * 1.0 / attempts;

       avg = (avg - 3) * 0.25;

       if(avg < 0)

           avg = 0;

       else if(avg > 2.375)

           avg = 2.375;

       return avg;

   }

  

   private static double percentTouchdown(int touchdowns, int attempts)

   {

       double percent = touchdowns * 100.0 / attempts;

       percent = percent * 0.2;

       if(percent > 2.375)

           percent = 2.375;

       return percent;

   }

  

  

   private static double percentInterceptions(int interceptions, int attempts)

   {

       double percent = interceptions * 100.0 / attempts;

       percent = 2.375 - percent * 0.25;

       if(percent < 0)

           percent = 0;

       return percent;

   }

  

   public static void main(String[] args) {

       String name;

       int completed, attempts, yards, touchdowns, interceptions;

       double percCompletions, avgYards, percTouchdowns, percInterceptions, rating;

      

       Scanner keybd = new Scanner(System.in);

      

       System.out.print(" Enter name: ");

       name = keybd.nextLine().trim();

      

       System.out.print(" Enter completed passes: ");

       completed = keybd.nextInt();

      

       System.out.print(" Enter attempted passes: ");

       attempts = keybd.nextInt();

      

       System.out.print(" Enter yards: ");

       yards = keybd.nextInt();

      

       System.out.print(" Enter touchdowns: ");

       touchdowns = keybd.nextInt();

      

       System.out.print(" Enter interceptions: ");

       interceptions = keybd.nextInt();

      

       percCompletions = percentComplete(completed, attempts);

       avgYards = avgYards(yards, attempts);

       percTouchdowns = percentTouchdown(touchdowns, attempts);

       percInterceptions = percentInterceptions(interceptions, attempts);

      

       rating = (percCompletions + avgYards + percInterceptions + percTouchdowns) * 100.0 / 6;

      

       System.out.println(" Completed : " + completed);

       System.out.println("Attempts: " + attempts);

       System.out.println("Yards: " + yards);

       System.out.println("Touchdowns: " + touchdowns);

       System.out.println("Interceptions: " + interceptions);

      

       System.out.printf(" Percentage of completions: %.3f" , percCompletions);

       System.out.printf(" Average yards gained: %.3f" , avgYards);

       System.out.printf(" Percentage of Touchdown passs: %.3f" , percTouchdowns);

       System.out.printf(" Percentage of Interceptions: %.3f" , percInterceptions);

       System.out.printf(" Rating : %.3f" , rating);

      

      

   }

}

output

Enter name: Steve Young

Enter completed passes: 324

Enter attempted passes: 461

Enter yards: 3969

Enter touchdowns: 35

Enter interceptions: 10

Completed : 324

Attempts: 461

Yards: 3969

Touchdowns: 35

Interceptions: 10

Percentage of completions: 2.014

Average yards gained: 1.402

Percentage of Touchdown passs: 1.518

Percentage of Interceptions: 1.833

Rating : 112.794

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote