CS 405 Assignment 11

Stock Analysis - Due April 29

The purpose of this assignment is to give you practice with dates, objects, text processing, and downloading files.

General Functionality

You should improve your Program 9 as follows, so that it has two additional UI features, boxes to enter dates into. There should also be the labels as necessary. The default value for the top date box should be 1/10/2014, and the default value for the bottom date box should be 3/10/2014.

The five buttons on the left should function pretty much the same as the last program, with one major difference, which is that the date range is not hard coded to be from 1/1/2013 to 12/31/2013, but should rather reflect the contents of the two UI components.

Once you have loaded the file, you should use yahoo stocks to get the price of the stock in question beginning with the date in the top date UI component ending with the date in the bottom UI component. You should load this data into your program so you can process it, identifying interesting stocks. The first stock you should identify is the most expensive stock according to the open column.

The next stock you should identify is the stock that went up the most. Note that the low price point must precede the high price point in time.

You should also check to make sure that the dates are actually such that the last date is after the first date.

Program Design

You should create a class to represent a single price point for the stocks. At minimum, this class will need to contain the stock's open price, but you may elect to store more information than this. You should create a class to represent individual stocks. Each individual stock should contain the ticker symbol, the company name, and the market capitalization of the stock. These should also contain a list of price points for the stock.

Preliminary Testing

Like the last program, before you begin, you should do some basic testing to make sure your classes work correctly.


I have included a few sample test data files.

I recommend not using the large file as it is, but rather copying a subset of that file into a new input file.


Submission Instructions

To submit this program, I would like all students to zip their project, and send it to me. I would like you to submit the entire project, which should be named Prog_11_lastname, where lastname is your last name. For me, this is Prog_11_Wilt. Students should email their completed projects to cs405@cs.unh.edu.

Late Policy

The assignment is due prior to midnight on the listed due date. For this assignment, that means you must turn in your solution before to April 30.

Unlike other classes you may have taken in the past, no late work is allowed for this class. This is worth repeating, because it is extremely important: no late work is allowed for this class. We will move quickly, and I do not want students straggling behind trying to catch up on work from previous weeks, which is what generally happens when late work is accepted.