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

for the hollywood movie rating guide,in which users continously enter a vialue f

ID: 3633369 • Letter: F

Question

for the hollywood movie rating guide,in which users continously enter a vialue from 0 to 4 that indicates the numbe rof stars they are awarding to the guides featured movie of the week. the program executes continuously until a user enters a negative number to quit. if a user enters a star value that does not fall in the correct range reprompot the user continously until a correct value is entered. At the end of the program dispaly the average star rating for the movie

Explanation / Answer

You did not specify which programming language, so I will use Java. import java.util.Scanner; public class rateMovie{ public static void main(String[] args){ Scanner inScan = new Scanner(System.in); double sum = 0; double curr = 0; double ave; int count = 0; while (curr >= 0){ System.out.println("Enter a rating (0-4). Negative number to quit."); curr = inScan.nextDouble(); if (curr > 4){ System.out.println("Invalid value. Not recorded."); } if (curr >= 0 && curr