Codeclan week 6 day 3 lab, given a test file, make the functions.
You have been given a project with two models, Cinema and Film, and their corresponding test files.
A Film has:
- a title
- a genre
- a year
- a length
A Cinema has:
- an array of Films
You should write the code to make the Cinema tests pass. You should use JavaScript’s built-in enumerator methods, only using forEach if you can’t find a way to use one of the other more appropriate methods.
MVP
Cinema:
- should have a collection of films
- should be able to get a list of film titles
- should be able to find a film by title
- should be able to filter films by genre
- should be able to check whether there are some films from a particular year (true/false)
- should be able to check whether all films are over a particular length (true/false)
- should be able to calculate total running time of all films
Extensions
- Add a another test, 'Cinema should be able to filter films by year'.