question archive Provide the method header for a method that you implemented that takes at least one parameter

Provide the method header for a method that you implemented that takes at least one parameter

Subject:Computer SciencePrice: Bought3

Provide the method header for a method that you implemented that takes at least one parameter. Explain why you chose the given parameter(s), including type, and why you made the method static or non-static.

public static int starRating(String fileName)

 {

  int answer = 0;

  if (totalSentiment(fileName) < -10) {

   answer = 0;

  } else if (totalSentiment(fileName) >= -10 && totalSentiment(fileName) <= -1) {

   answer = 1;

  } else if (totalSentiment(fileName) >= 0 && totalSentiment(fileName) <= 9) {

   answer = 2;

  } else if (totalSentiment(fileName) >= 10 && totalSentiment(fileName) <= 19) {

   answer = 3;

  } else {

   answer = 4;

  }

  return answer;

 }

this is the method that is referenced in the question.

 

 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE