Write a complete C program determine whether a movie is recommended to watch or not based on user input. Write a complete C program based on the above situation and the following instructions. i....


Write a complete C program determine whether a movie is recommended to watch or not  based on user input.


Write a complete C program based on the above situation and the following instructions.  i. Declare a
structure
of movie record called
MovieRecord
that has:


∙ Movie title :
title (string)


∙ Movie year :
year (int)


∙ Movie rating :
rating (float)


∙ Movie recommendation :
recommend (string)



  1. In main()


∙ Create a structure variable array called
movie
that can store 3 movie records. ∙ Call
getUserDetails()
to get the details of the user.


∙ Call
getMovieRatings()
and pass in the structure array movie as argument. ∙ Calculate the average rating of the movies. Set average rating as global variable. ∙ Call
getRecommendation()
and pass in the record of each movie as reference. ∙ Finally, display the details as per sample output.


iii. In
getUserDetails()


∙ Get the name and user ID of the user.



  1. In
    getMovieRatings()


∙ Get the movie title, movie year, and movie rating from the user.


o If movie rating entered by user is out of range, ask user to re-enter the movie  rating.


∙ Calculate the total ratings of the movies and return back the value.
v.
In
getRecommendation()


∙ Identify whether it is recommended to watch the movie or not based on the  average rating.


Sample Output :


User Registration<br>Name : James Tan<br>User ID : JT1010<br>Movie Ratings<br>Movie Title : The Rope Curse 2<br>Movie Year : 2020<br>Rating (0-5) : 3.98<br>Movie Title : 6 Underground<br>Movie Year : 2019<br>Rating (0-5) : -9<br>Rating out of range.<br>Rating (0-5) 20<br>Rating out of range.<br>Rating (0-5) : 4.5<br>Movie Title : The King<br>Movie Year : 2019<br>Rating (0-5) : 2.1<br>You have given an average rating of 3.53<br>Movie Summary<br>The Rope Curse 2 - RECOMMENDED<br>6 Underground<br>The King<br>RECOMMENDED<br>NOT RECOMMENDED<br>

Extracted text: User Registration Name : James Tan User ID : JT1010 Movie Ratings Movie Title : The Rope Curse 2 Movie Year : 2020 Rating (0-5) : 3.98 Movie Title : 6 Underground Movie Year : 2019 Rating (0-5) : -9 Rating out of range. Rating (0-5) 20 Rating out of range. Rating (0-5) : 4.5 Movie Title : The King Movie Year : 2019 Rating (0-5) : 2.1 You have given an average rating of 3.53 Movie Summary The Rope Curse 2 - RECOMMENDED 6 Underground The King RECOMMENDED NOT RECOMMENDED
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here