CPSC 220 Fall 2007
Program 2: Ranking Employers

In Program 1 you processed employment data for the Roanoke area, aggregating employers with multiple locations and allowing the user to search for an employer by name. In this assignment you will extend that program as described below to allow the user to find the largest employers in the area.

Input and Output

Like Program 1, your program should prompt the user for the data file and should allow the user to search for companies by name. In addition, it should allow the user the list the next N largest employers -- those with the most employees -- in order from highest to lowest. To determine how many employees an employer has for these purposes, use the aggregate number of employees from all of the employer's locations, and take the average of these aggregates over the three months. For example, Wal Mart's empoyment data is as shown below:
Address 1: 4807 VALLEY VIEW BLVD N.W. ROANOKE, VA 24012
Employees: 406,413,412

Address 2: 1851 W MAIN STREET SALEM, VA 24153
Employees: 355,351,335

Employees: 245,245,253

Address 4: 4210 FRANKLIN RD ROANOKE, VA 24014
Employees: 228,232,222

Address 5: 1455 TOWN SQUARE BLVD ROANOKE, VA 24012
Employees: 161,156,157

Total Employees: 1395,1397,1379
For purposes of this ranking, Wal Mart has (1395 + 1397 + 1379)/3 = 1390 employees (truncate fractional employees).

Give the user a menu so that they can switch back and forth between searching for a company by name and listing the next N top employers. Note that if the user asks for the next 10 top employers and then the next 10 top employers again, they should get two different lists -- the first will have employers #1-10, the second will have employers #11-20.

Program Structure

This program builds directly on Program 1 as follows:


Program documentation is very important. Follow the guidelines below:

What to Turn In

Zip your prog2 directory and e-mail it to me by the deadline. Turn in hardcopy of any classes you modified along with your performance report.