Difference between revisions of "CSC111 Final Exam 2015"

From dftwiki3
Jump to: navigation, search
Line 142: Line 142:
 
  Invalid file name.  Please reenter
 
  Invalid file name.  Please reenter
 
  File name? twitterFeed.txt
 
  File name? twitterFeed.txt
  Location of interest? Northampton
+
  Location of interest? northampton
 
  keyword of interest? Maya
 
  keyword of interest? Maya
  ---Output---
+
File name? twitterFeed.txt
  283 tweets read
+
  --- Output ---
  Earliest20150326 15:12:09
+
  252 tweets read
  Latest:    20150422 14:13:57 
+
  earliest20141110 02:21:14
  Number of distinct locations = 34
+
  latest:    20150423 09:31:16
  Number of times Northampton appears = 215
+
  Number of distinct locations: 24
  Number of times Maya appears in text = 4
+
  Number of times Location "northampton" appears: 114
 
+
  Number of times "Maya" appears in text: 5
 
<br />
 
<br />
 
* Your program must match this output as closely as possible, including the "---Output---" line.  Remember that your program will be tested with a collection of tweets that will be different, and probably gathered in a different time period, so your program must locate the oldest and newest tweets, and not simply output the dates shown above!
 
* Your program must match this output as closely as possible, including the "---Output---" line.  Remember that your program will be tested with a collection of tweets that will be different, and probably gathered in a different time period, so your program must locate the oldest and newest tweets, and not simply output the dates shown above!
Line 157: Line 157:
 
==Testing==
 
==Testing==
 
<br />
 
<br />
* Test your program well.  In particular, your program should be able to not crash if the file given to it contains only 1 entry, or if the file is empty!
+
* Test your program well.  In particular, your program should be able to not crash if the file given to it contains only 1 entry, or if the file is empty.
 
* You can assume that all entries will always contain 4 fields (date, location, screen-name, and text).
 
* You can assume that all entries will always contain 4 fields (date, location, screen-name, and text).
 +
* When looking for the number of unique locations found in the tweets, "Northampton, MA" and "Northampton, Massachusetts" count as 2 different locations.  Basically if the lowercase versions of two different locations are not equal, the locations are distinct.  "Northampton MA" and "Northampton, MA" are distinct (because of the comma).  "northampton" and "Northampton" are the same.
 
<br />
 
<br />
 
==Submission==
 
==Submission==

Revision as of 08:49, 23 April 2015


...