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)
ii. 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.
iv. 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.


大★★★★★★★★★★★★★★★★★★<br>************<br>User Registration<br>*******<br>Name : James Tan<br>User ID : JT1010<br>***<br>**********<br>Movie Ratings<br>*********<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) :<br>20<br>Rating out of range.<br>Rating (0-5)<br>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>******<br>************<br>The Rope Curse 2<br>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
Write a complete C program determine whether a movie is recommended to watch or<br>not based on user input.<br>Write a complete C program based on the above situation and the following<br>instructions. i. Declare a structure of movie record called MovieRecord that has:<br>• Movie title : title (string)<br>• Movie year : year (int)<br>• Movie rating : rating (float)<br>• Movie recommendation : recommend (string)<br>ii. In main()<br>Create a structure variable array called movie that can store 3 movie records.<br>Call getUserDetails() to get the details of the user.<br>Call getMovieRatings() and pass in the structure array movie as argument. •<br>Calculate the average rating of the movies. Set average rating as global variable. •<br>Call getRecommendation() and pass in the record of each movie as reference. •<br>Finally, display the details as per sample output.<br>iii. In getUserDetails()<br>Get the name and user ID of the user.<br>iv. In getMovieRatings()<br>Get the movie title, movie year, and movie rating from the user.<br>o If movie rating entered by user is out of range, ask user to re-enter the<br>movie rating.<br>Calculate the total ratings of the movies and return back the value.<br>v. In getRecommendation()<br>Identify whether it is recommended to watch the movie or not based on the<br>average rating.<br>SAMPLE OUTPUT<br>

Extracted text: 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) ii. 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. iv. 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
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here