Question: Can someone explain what im supposed to do here? Use Case 3: Browse Films by Category Extend the FilmDAO class to return a list of
Can someone explain what im supposed to do here?



Use Case 3: Browse Films by Category Extend the FilmDAO class to return a list of films that are labeled as part of a given category or genre. There are 16 categories in the database. You have a class (which I have modified somewhat to facilitate search) that identifies those categories: FilmCategory. This class is an enum and it is defined thus: public enum FilmCategory NONE, ACTION ANIMATION,CHILDREN,CLASSICS COMEDY, DOCUMENTARY DRAMA FAMILY FOREIGN,GAMES HORROR, MUSICNEW,SCI_FISPORTS,TRAVEL; The database stores the category values as integers. ACTION-1, ANIMATION-2, CHILDREN = 3, etc. The ordinal number of the enum (its position in the enum declaration) is the same as the category value if the database. So, ACTIONordinal == 1. The film category is not stored with the film. The category is stored in the table category. Here's a screen shot of that table. Figure 1: Category Table There is a link table (we discussed this in class) that relates the film with its category. That table is film_category. To select all filims from given category, you need a select statement like the following: SELECT film.film_id, film.title, film.description, film.length, film.rating, film.release_year FROM film, film_category WHERE filmfilm-id=film_category.film-id AND film-category.category_id=
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
