Homework 5

a. Design a program for the Hollywood Movie Rating Guide, in which users continuously enter a value from 0 to 4 that indicates the number of stars they are awarding to the Guide’s 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, re-prompt the user continuously until a correct value is entered. At the end of the program, display the average star rating for the movie.

 b. Modify the movie-rating program so that a user gets three tries to enter a valid rating. After three incorrect entries, the program issues an appropriate message and continues with a new user.


 c. Modify the movie-rating program so that the user is prompted continuously for a movie title until ZZZZZ is entered. Then, for each movie, continuously accept star-rating values until a negative number is entered. Display the average rating for each movie.

    • Posted: 4 years ago
    A+ Work

    Purchase the answer to view it

    Save time and money!
    Our teachers already did such homework, use it as a reference!