Assignment 2

Due date: Wednesday, October 10, in the lab.
NOTES:
This is a more advanced JAVA project. This assignment requires object oriented techniques.

Problem description

The project goal is to collect and manage data collected from Twitter. You will build your project according to the following requirements:
  1. The first step is to get familiar with Twitter API and how to interact with it from your own Java application. Here are some examples. You will use the Search for Tweets functionality of the API.
  2. It requires a simple user interface from which the user can specify the keyword query. The user interface has three parts. One part is the query part that includes at least a text box, a SUBMIT button, and a SAVE button. One other part of the window will display the results (tweets) returned in response to a user query. The third part will display some aggregate results, which will be described below.
  3. When the user clicks on SUBMIT, you will take the keyword query and pass it to the Twitter API. Get all the results and display them to the user.
  4. The user may decide to keep the data that was returned in response to the query and she will press the button SAVE. You have to take the set of tweets and store them in a data structure according to the following requirements.
    1. Create a class structure to manage tweets. The class will store pieces of data such as text, time, user.
    2. For each tweet, determine if the tweet contains a hashtag. If it does, extract the hashtag. Use the hashtag to index the tweets.
    3. Using the data structures covered so far, i.e., ArrayList, Vector, and SingleLinkedList, keep track of all the tweets that contain a certain hashtag. Note that a tweet may have more than a hashtag, hence, it may belong to multiple lists of tweets.
    4. For each hashtag, keep a count of the number of tweets that contain it.
    5. In the third part of your GUI show the top-10 hashtags according to their count. The list updates after each click of the SAVE button.
  5. Implementation requirements:
    • use Java ArrayList and LinkedList data structures to keep track of the data handled by your program.
      NOTE: the use of other data structures other than these two will be penalized.