QUESTIONS- 1. Create and array of objects named movies . Each of the objects in the array will represent a movie. Each object should have properties for: movie title release year rating (your rating 1 - 10) genres (an array of genres. eg ["Drama", "Mystery", "Sci-Fi", "Western"] ) The array should contain at least 5 of movies you have seen (choose your own movies) You do not need to use JSON to create this array You can use IMDB if you need help finding the info for your movie 2. Now that digital format is taking over, we would like to add a property to each object for the format (“film” or “digital”). The property will be called format . Assuming that all movies in our data set where shot on film, use .forEach() to add the property and set a value of “film” for each movie. 3. Use the .map() method to create an array of movie titles from our initial data set named movieTitles . 4. Use the .reduce() method to find the highest and lowest rated movies in the data set. Store these objects in variables named highestRated and lowestRated . 5. Use the .filter() method to create an array of movies that have a rating of 7 or higher. Store this array in a variable named highlyRated . 6. Display the following in the console with text to describe each value: The title of each movie (hint: .join() to make it look nicer) The highest rated movie title and rating The lowest rated movie title and rating The titles of movies that have a rating of 7 or more (Hint: you may want to add a .map() when you output) Sample output: Movie titles: Blade Runner 2049, Blade Runner, Spectre, The Golden Compass, Sherlock Holmes Highest rated: Blade Runner (9) Lowest rated: The Golden Compass (5) Highly rated: Blade Runner 2049, Blade Runner, Spectre, Sherlock Holmes

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter6: Using Arrays
Section: Chapter Questions
Problem 5E
icon
Related questions
Question

QUESTIONS-

1. Create and array of objects named movies . Each of the objects in the array will represent a movie.
Each object should have properties for:
movie title
release year
rating (your rating 1 - 10)
genres (an array of genres. eg ["Drama", "Mystery", "Sci-Fi", "Western"] )
The array should contain at least 5 of movies you have seen (choose your own movies)
You do not need to use JSON to create this array
You can use IMDB if you need help finding the info for your movie
2. Now that digital format is taking over, we would like to add a property to each object for the format (“film” or
“digital”). The property will be called format . Assuming that all movies in our data set where shot on film, use
.forEach() to add the property and set a value of “film” for each movie.
3. Use the .map() method to create an array of movie titles from our initial data set named movieTitles .
4. Use the .reduce() method to find the highest and lowest rated movies in the data set. Store these objects in
variables named highestRated and lowestRated .
5. Use the .filter() method to create an array of movies that have a rating of 7 or higher. Store this array in a
variable named highlyRated .
6. Display the following in the console with text to describe each value:
The title of each movie (hint: .join() to make it look nicer)
The highest rated movie title and rating
The lowest rated movie title and rating
The titles of movies that have a rating of 7 or more (Hint: you may want to add a .map() when you output)
Sample output:
Movie titles: Blade Runner 2049, Blade Runner, Spectre, The Golden Compass, Sherlock Holmes
Highest rated: Blade Runner (9)
Lowest rated: The Golden Compass (5)
Highly rated: Blade Runner 2049, Blade Runner, Spectre, Sherlock Holmes

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning