2551.p5.Spring2010

2551.p5.Spring2010 - COP 2551 Introduction to OOP Program#5...

Info icon This 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: Tuesday, 23 April 2010 Using NetBeans 6.7.1, you are to write a Java program using OOP principles to accommodate the following functionality Using the input file Countries.txt, you are to build a 4 by X array of integers, average the numbers in each row and display the array and averages. 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 ‘that’ region. Specifically, row 1 would have six columns: 480000 720000 500000 100000 1360000 and 15000 namely arrayName (0,0), (0,1), (0,2), etc. that is, all the populations from countries that were in region 1. Your second row will have all the populations from those countries that are in region 2, etc. Since there are four regions, your two-dimensional array will have four rows. The number of columns depends on the number of countries in that region.
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern