Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

Please explain how to get the genre list to filter and how to associate the i to the title of the movie and display it on the finish screen. You can press to view code on the top right of the screen and you can edit it by creating a remix. Thank you for you help it is due today at 12.

var nameList = getColumn("Netflix Content", "Title");
var typeList = getColumn("Netflix Content", "Type");
var typeSelection;
onEvent("typeDropdown", "click", function( ) {
typeSelection = getText("typeDropdown");
});
onEvent("startButton", "click", function( ) {
setScreen("typeScreen");

console.log("in STARTBUTTON typeSelection = "+typeSelection);

});
onEvent("toRatingButton", "click", function( ) {
setScreen("finishScreen");
console.log("typeSelection = "+typeSelection);

// for (var i = 0; i < nameList.length; i++) {
for (var i = 0; i < 25; i++) {
console.log(((" i="+i)+" "+typeSelection)+" "+ratingSelection+" "+genreSelection+"--"+typeList[i]+" "+ratingList[i]+" "+genreList[i]);
// if ((typeList[i] == typeSelection) && ((ratingList[i] == ratingSelection)) && ((genreList[i] == genreSelection)) ){
if ( (typeList[i] == typeSelection) && (ratingList[i] == ratingSelection) ){
// appendItem(filteredNameList, typeList[i]);
console.log("ADDED i="+i+" "+typeList[i]+" "+ratingList[i]+" "+genreList[i]);

appendItem(filteredTypeList, typeList[i]);
appendItem(filteredGenreList, genreList[i]);
appendItem(filteredRatingList, ratingList[i]);
// appendItem(filteredTypeList, typeList);
}
}


});
onEvent("retryButton", "click", function( ) {
setScreen("homeScreen");

console.log("filteredNameList = "+filteredNameList);

setProperty("resultOutput", "text", "Your film is: " + filteredNameList);
});

var filteredNameList = [];
var filteredTypeList = [];
var filteredGenreList = [];
var filteredRatingList = [];

 

//function updateScreen() {
// var index = randomNumber(0, filteredNameList.length - 1);
//}

onEvent("typeDropdown", "change", function( ) {
typeSelection = getText("typeDropdown");
console.log("Selected option: " + typeSelection);

});

Code Design Data
Data Browser
O Version History
O Back to data
Debug view
homeScreen
Netflix Content
Visualize Data
Clear table
Import csv
Export to csv
What Movie Should
You Watch On Netflix?
id
Type Title
* Country
Data Added
Release Year
Rating
Genre
Actions
Add
23
enter
enter text
enter text
enter text
enter text
enter te:
enter text
Row
Find Your Show!
"Comedies, Cult
Movies,
Edit
"Esperando La
Carroza"
1
"Movie"
"Argentina"
"7/15/2018"
1985
"NR"
International
Delete
Movies"
"Documentaries,
Edit
"Lucha: Playing
the Impossible"
International
"Movie"
"Argentina"
"7/15/2018"
2016
"TV-PG"
Movies, Sports
Delete
Movies"
Run
"Dramas,
Edit
International
3
"Movie"
"Just Love"
"Argentina"
"1/24/2019"
2018
"TV-MA"
Movinr Mueic 8.
Page: 1 2 3 4 5 6 7 8 9 10
expand button
Transcribed Image Text:Code Design Data Data Browser O Version History O Back to data Debug view homeScreen Netflix Content Visualize Data Clear table Import csv Export to csv What Movie Should You Watch On Netflix? id Type Title * Country Data Added Release Year Rating Genre Actions Add 23 enter enter text enter text enter text enter text enter te: enter text Row Find Your Show! "Comedies, Cult Movies, Edit "Esperando La Carroza" 1 "Movie" "Argentina" "7/15/2018" 1985 "NR" International Delete Movies" "Documentaries, Edit "Lucha: Playing the Impossible" International "Movie" "Argentina" "7/15/2018" 2016 "TV-PG" Movies, Sports Delete Movies" Run "Dramas, Edit International 3 "Movie" "Just Love" "Argentina" "1/24/2019" 2018 "TV-MA" Movinr Mueic 8. Page: 1 2 3 4 5 6 7 8 9 10
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education