CPSC 220 Fall 2007
Program 1: Employment Data

Background

The Commonwealth of Virginia is divided into 21 planning districts. Planning District Commissions have been established with the following purpose, as described in the Code of Virginia, Section 15.2-4207:

"...to encourage and facilitate local government cooperation and state-local cooperation in addressing on a regional basis problems of greater than local significance. The cooperation resulting from this chapter is intended to facilitate the recognition and analysis of regional opportunities and take account of regional influences in planning and implementing public policies and services. The planning district commission shall also promote the orderly and efficient development of the physical, social and economic elements of the district by planning, and encouraging and assisting localities to plan, for the future." (Information from An Introduction to Planning District Commissions and the Roanoke Valley-Allegheny Regional Commission, http://www.rvarc.org/about.htm.)

One such planning commission is the Roanoke Valley-Allegheny Regional Commission (RVARC), located on Luck Avenue in Roanoke. Among its many functions, the RVARC uses employment data collected by the Virginia Employment Commission (VEC) to identify areas of economic growth in the region. The VEC data provides the following information about each employer in the region for each quarter of each year:

The RVARC faces a number of challenges in processing the data it receives from the VEC. One such challenge is that many companies have multiple locations, and for most purposes the RVARC would like to combine all locations for a single company.

Your assignment is to write a Java program that takes a file containing this data, aggregates employment information for employers with multiple locations, and answers queries about the aggregated data. Requirements for input, output, and program structure are given below.

Input

Your program should prompt the user for the name of the data file to use. You can test your program on file employ99-2.dat, which contains the data described above for the second quarter of 1999. The data for each company is stored in 21 comma-separated fields. Download and open the data file and identify exactly what the fields are -- the first line contains headers for each field that should help. You can assume that any data file used will be in the same format, including the header row.

After prompting for the data file, your program should repeatedly prompt the user for the name of an employer, then display information for that employer as described below. Allow the user to look up as many companies as he or she wishes, with some nice way to exit the program when finished.

Output

For each company requested by the user, the following information should be displayed to the standard output, neatly labeled and formatted: In doing searches, if the trade name is different from the legal name, match the trade name; otherwise match the legal name.

Program Structure

Structure your program around the following classes: Of course, you will probably need other classes as well; these are just to get you started.

Your program should operate in two phases:

Documentation

Program documentation is very important. Follow the guidelines below:

What to Turn In

Embed your jss2 directory in your prog1 directory, zip the whole thing and e-mail it to me by the deadline. Turn in hardcopy of any classes you modified along with your performance report.