Question: Need a java program. which can work in code sandbox Create and array of objects named movies. Each of the objects in the array will

Need a java program. which can work in code sandbox

Create and array of objects named movies. Each of the objects in the array will represent a movie. The array should contain at least 6 movies you have seen (choose your own movies) You can use IMDB.com if you need help finding the info for your movie Each object should have properties for: movie title (string) release year (number) rating (your rating, a number 1 - 10) genres (an array of strings. eg ["Drama", "Mystery", "Sci-Fi", "Western"])

2. Now go back and add the property "format" with the value "digital" to a couple of the newer movies in the array (but not all of them). 3. Now that digital format has taken over, we would like to add the "format" property to each object that does not already have it. Use .forEach() to add the property "format" with a value of "film" for each movie that does not already have the property.

4. Use the .sort() method to sort the array of movies by rating, best to worst. Make sure that at least one of your movies has a rating of 10. 5. Use the .map() method to create an array of movie titles from our initial data set named movieTitles.

6. 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.

7. 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. 8. Display the following in the console, using template literals, 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 Sample Output: (Don't use these titles in your assignment, use your own.) Movie titles: Blade Runner, Sherlock Holmes, Spectre, Blade Runner 2049, Soul, The Golden Compass Highest rated: Blade Runner (10) Lowest rated: The Golden Compass (5) Highly rated: Blade Runner, Sherlock Holmes, Spectre, Blade Runner 2049 Note: Do not use these movies or the same movies as a classmate. Notes: Do not use the movie titles in the sample output Do not concatenate strings, use template literals Have at least 6 movie objects in your array You will not use any loops in your program Submission Details: Do not use the var keyword. Instead use let or const Do not include any HTML tags Do not use document.write Save your code to a file called as3b.js (please use lowercase)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!