Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part a) Define a struct for a Movie which has the following fields: MovieName (string), ActorNames (vector of strings), views (int), rating (double). Part b)
Part a) Define a struct for a Movie which has the following fields: MovieName (string), ActorNames (vector of strings), views (int), rating (double).
Part b) Write a C++ function that takes a vector of Movies and a string ActorName and returns the average rate of the movies that ActorName played in. For example, if the ActorName played in 3 movies with the following rates: 3, 1, and 4, your function should return (3+1+4)/3 = 2.67
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started