2551.p5.Summer2010

2551.p5.Summer2010 - COP 2551 Introduction to OOP Program...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
COP 2551 – Introduction to OOP Program #5 Due: Friday, 30 July 2010 midnight There is no drop-dead date due to end of semester. Using NetBeans 6.8, you are to write a Java program using OOP principles to accommodate the following functionality Using the input file States.txt, you are to build a 4 by X array of integers, average the numbers in each row and display the array and averages. (If you wish, you may use ArrayList). Each record in the input file has two fields of interest to you: the region number and the population. (You will need a substring to extract those two numbers, as in Program 4) Task 1: Build a Two-Dimensional Array . Build a 4by X array such that each row contains a list of integers for populations of states in ‘that’ region. Specifically, row 1 would have six columns: 480000 720000 500000 100000 1360000 and 15000 (or some such numbers) namely arrayName (0,0), (0,1), (0,2), etc. that is, all the populations from state that were in region 1. Your second row will have all the populations from those states that are in region 2, etc.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

2551.p5.Summer2010 - COP 2551 Introduction to OOP Program...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online