package lab03;

/**
 * A utility class that can be used to create ratings for professors.
 *
 * @author Prof. David Bernstein
 * @version 1.0
 */
public class Rater {

    /**
     * Return a rating about a particular professor.
     *
     * @param likes The number of students who like the professor 
     * @param size The size of the class
     * @return The rating
     */
    public static String ratingFor(String name, double likes, double size) {

        int percentage;
        String result;
        
        percentage = (int)((likes / size) * 100);    
        result = "Prof. " + name + " is rated " + percentage + " percent.";
        
        return result;
    }
}
