Consider a class Movie that contains information about a mov
Solution
package chegg;
public class Movie {
   
    String movieName;
    public String getMovieName() {
        return movieName;
    }
   public void setMovieName(String movieName) {
        this.movieName = movieName;
    }
   public String getMPAA() {
        return MPAA;
    }
   public void setMPAA(String mPAA) {
        MPAA = mPAA;
    }
   String MPAA;
    int one_star=0;
    int two_star=0;
    int three_star=0;
    int four_star=0;
    int five_star=0;
   
    int addReview(int stars){
       
       
        if(stars>1 && stars<=5){
            if(stars==1){
                one_star++;
            }
            if(stars==2){
                two_star++;
            }
            if(stars==3){
                three_star++;
            }if(stars==4){
                four_star++;
            }
            if(stars==5){
                five_star++;
            }
        }
        return 1;
    }
   
    int getAverage(){
        int avg= (one_star+two_star+three_star+four_star+five_star/5);
        return avg;
    }
   
    public static void main(String args[]){
        Movie m = new Movie();
        m.setMovieName(\"Avengers\");
        m.setMPAA(\"G\");
        m.addReview(2);
        m.addReview(3);
        m.addReview(3);
        m.addReview(4);
        m.addReview(4);
       
        System.out.println(m.getMovieName());
        System.out.println(m.getMPAA());
        System.out.println(m.getAverage());
       
        Movie m1 = new Movie();
        m1.setMovieName(\"Die Another Day\");
        m1.setMPAA(\"PG\");
        m1.addReview(4);
        m1.addReview(3);
        m1.addReview(3);
        m1.addReview(4);
        m1.addReview(5);
       
        System.out.println(m1.getMovieName());
        System.out.println(m1.getMPAA());
        System.out.println(m1.getAverage());
       
       
    }
}


