Your program should provide the following functionality:
Your program will begin by reading from a file a list of URLs for the feeds the user is interested in reading. The format of your configuration file should look like this example. Notice that each line contains a prefix indicating the type of the feed (general or podcast), followed by a colon, followed by the URL of the feed.
Below are several URLs you can begin with:
General Feeds:
http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml
http://feeds.arstechnica.com/arstechnica/BAaf
Podcast/iTunes Feeds:
http://feeds.feedburner.com/coverville
http://www.wdwinfo.com/podcast/unplugged.xml
http://www.npr.org/rss/podcast.php?id=1090&uid=b65ec27c2cdc209bd5237dce3d494d52
You will need to retrieve the contents of all feeds the user is interested in, and build a collection of objects (you should use the ArrayList class) containing the information. For each URL in the configuraiton file, retrieve the associated feed. Using the XML parser, you should be able to easily retrieve the feed and generate its XML tree. Next, extract the appropriate information from the tree and use it to build an object for each item element.
You will need to think carefully about the information you will store in each item object. First, you will need to store relevant information about the feed itself, including the title. Second, you will need to store relevant information about the specific item, including (but not limited to!) the publication date, title, author, and description.
Notice that the item elements in the Podcast/iTunes Feeds listed above contain more information that the item elements in the General Feeds. You will need to create a specialized class (subclass!) that contains not only the information listed above, but also iTunes specific information such as the summary and duration.
At the end of this step, you will have a collection of objects -- several from the first feed, several from the second feed, and so on.
Once you have retrieved all of the feed contents, you will display the 30 most recent items sorted by date, most recent first. Next, prompt the user with a menu displaying the following choices:
If the user selects the "View all details for a specific item" choice, display all item titles and an index for each. Then, allow the user to specify the index of the item he/she wishes to see.
If the user selects the "Search titles" choice, ask the him/her for a search term and display the titles of all items that have the search term in the item title.
Continue to prompt the user with this menu until he/she chooses to quit.
15 | Overall design and documentation |
10 | Compiles and runs |
10 | Demonstration and oral responses |
10 | Correctly processes configuration file |
15 | Correctly retrieves feeds and builds collection |
10 | View 30 most recent items |
5 | View items from General feeds |
5 | View items from Podcast feeds |
10 | View detail |
10 | Search |