Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Javascript Assignment 1 Movie Ratings Program Your task is to create a movie ratings program. You will have to write a program that creates

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
1. Javascript Assignment 1 Movie Ratings Program Your task is to create a movie ratings program. You will have to write a program that creates a movie class that will save details about each movie: 1. Movie Title 2. Movie Screen Rating (G.PG.PG-13, R.NC-17) 3. Movie Genre (Comedy, Documentary, Animated, etc.) 4. Total number of raters 5. Average Rating (average of ratings given between 1 and 5 across all raters) 1. Javascript Assignment 1 The functions that should be included in the movie class are: 1. a showMovie() function: This function should .display all of the available information about the movie object Example: Title: Monster Hunters Genre: Sci-fi This movie is rated R This movie currently has out of 5 stars Collapse 1. Javascript Assignment 1 2. a rateMovie() function: This function should take in the rating given by the user and update the average rating for the movie. For example: if the current average rating is 3 stars with 12 viewers having rated it, and the user has rated it at 5 stars, the new rating is ((3 x 12)+5)/13 =>3.15 stars. You will be allowed to set the ratings for your movies when you create them if you d like, or have them randomly generated when the movie object is constructed 1. Javascript Assignment 1 The program already includes code to prompt the user to choose the movie they would like to rate and to enter their rating. You will have to complete the code so that the program will create 4 movies, which you will store in an array. Present the movies available to rate to the user=The user will choose a movie, then enter their rating for that movie. The program should show the user the movie details with the update ating Javascript Assignment 1 1. the user should be able to rate as many movies as many times as they want during the execution of the program 2. the program should be able to catch and handle user mistakes like o incorrect input types (numbers lower than 1 or higher than 5 for ratings, letters instead of numbers etc.) o misspellings of inputs o unknown options (eg movies that don't exist)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

6. Conduct a cost-benefit analysis for a training program.

Answered: 1 week ago