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.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section13.2: Arrays Of Structures
Problem 3E
icon
Related questions
Question

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.

大★★★★★★★★★★★★★★★★★★
************
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
Transcribed Image 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
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
Transcribed Image 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
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr