Question: The application will help user(s) to decide on a movie for a movie-night among friends. At first there should be a page that allows users
The application will help user(s) to decide on a movie for a movie-night among friends. At first there should be a page that allows users to create and modify the list of friends. Each friend needs to be assigned an ID (automatically) and has a minimum of 2 further columns in a'friend'table: firstname and lastname. You can add additional fields as you like.
Next, there needs to be a page that allows the user(s) to pick one of the friends that had been created and enter a top-10 list of movies for that friend. This information needs to be reflected in the database with a table named'movielist'. This table has 12 columns: id (auto increment), friendid, movie1, movie2, movie3, movie4, movie5, movie6, movie7, movie8, movie9, movie10. For each friend there must exist exactly 1 record in the movielist table, referencing that friend in its 'friendid' column. The user should be able to enter and modify up to 10 movies for each friend on that page.
Finally, there needs to be the page that makes the decision on what movie will be watched. On this page, the user first picks or selects all the friends who participate in the movie night. After that selection has been performed, there should be a control/button that randomly selects 1 movie among the pool of movies of the friends which are present.
Example:
Alice, Bob, Charlie, and Denise are 4 friends. The user enters their names on the friends page. Then the user goes to the movies page. Alice likes Harry Potter, so she enters 5 Harry Potter movies for her. Bob likes Titanic, Lord of the Rings 1-3, Alien, Terminator, and Rambo. Charlie enters 10 James Bond Movies. Denise is a big fan of Disney, so she enters Beauty and the Beast, Snow White, Dumbo, The Junglebook, Frozen, Peter Pan, Sleeping Beauty, and Cinderella. In the evening they want to watch movie night. Bob isn't feeling well, so he is not joining his friends. Alice, Charlie, and Denise go to the Decision Page, and select their names. The program now looks at their respective movies (which are: the 5 Harry Potter movies, the 10 James Bond movies, and the Disney movies from Denise), and selects 1 randomly from this pool of 23 movies, for instance: Frozen. The 3 friends then watch Frozen together.
For Sprint 1 you will have to design and implement all the services you will need so that your app can interact with your database (CRUD operations for the two tables), as well as an endpoint that makes the random selection of the movie from the friend list. These REST Services need to be implemented using the Python Flask Framework. You will be testing your code without the need to have the pages implemented that make up the web-based user interface for the app.
Can you help me with the endpoint for random selection? How Can I get selection of the friends who is going to watch the movei?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
