// Helene Martin, CSE 142 // This incomplete program displays information about movies // matching the user's search query import java.util.*; import java.io.*; /* System.out.println("Rank Votes Rating Title"); System.out.println(rank + "\t" + votes + "\t" + score + "\t" + title); */ public class IMDB1 { public static void main(String[] args) throws FileNotFoundException { System.out.println("This program will allow you to search the"); System.out.println("imdb top 250 movies for a particular phrase."); System.out.println(); Scanner console = new Scanner(System.in); System.out.print("Search word? "); String search = console.next().toLowerCase(); Scanner input = new Scanner(new File("imdb.txt")); while (input.hasNextLine()) { String line = input.nextLine(); Scanner lineScan = new Scanner(line); String lineLC = line.toLowerCase(); if (lineLC.contains(search)) { System.out.println(line); } } } }