This project uses some of the data from the WorldData.csv file to create the Population Report

economics

Description

Objectives – learn/practice the following new concepts:

  •  Input & output data files
  •  Calculating stats (total, average, n, minimum, maximum) for a stream of data
  •  use a pre-existing method and call it
  •  stream of data [input file]
  •  prints for creating a nicely formatted report

BASIC REQUIREMENTS

  •  A top comment including your name, lab section day/time, asgn number & name of the application
  •  Appropriate descriptive variable naming, including use of camel case (and variables start with a small letter)
  •  incremental development
  •  follow these written specs (and other things specified by your lab instructor)
  •  output goes to a DATA FILE (though you MAY write to the Console window for your own debugging work)
  •  follow written specs in terms of which algorithms/approaches to use and the output formatting, etc.
  •  indent/align program code to show program logic (use NetBeans’ dropDown menu Source, then choose Format)
  •  do not type beyond the red line in NetBeans

PROJECT OVERVIEW

This project uses some of the data from the WorldData.csv file to create the Population Report (written to the data

file). This includes various statistics like average, lowest, highest, etc. in various categories.

INPUT FILE: WorldData.csv (a text file which has “Comma Separated Values”). This file contains basic data for

every country in the world (based on data from 2015). The 1st 4 records (lines) contain “meta-data”. The rest of

the records contain the actual data. Each data record contains these fields, in this order:

Number – ignore this field for this program

Country Name

Population

Yearly Change – ignore this field

Net Change – ignore this field

Population Density (Population/Km2) – ignore this field

Land Area (Km2) [FYI: to convert to square miles, multiply by 0.386102]

Migrants (net migration in (+) or out (-))

Fertility Rate – ignore this field

Median Age

Urban Pop % [contains % symbol which needs to be removed before processing data]

World Share % - ignore this field

PROCESSING:

A. SKIP THESE RECORDS (when doing ANY stats calculations or storing data in the parallel arrays):

1. the header records – i.e., the 1


st 4 records in the file


2. countries which have

a. nothing in Migrants field (that is, an empty string, which is ‘’”)

b. “N.A.” (“Not Available”) in the Median Age field

c. EITHER “N.A.” OR “0.0%” in the Urban Pop % field


B. When determining the Population, Land Area and Median Age stats – use the data STREAM processing

algorithm – that is, do the calculating as you’re reading the data in from the INPUT FILE

OUTPUT REPORT FILE: PopulationReport.txt – looks like the following:

[NOTE: The data below isn’t necessarily accurate, I’m just showing you the required formatting].

[NOTE: Use this exact formatting].

POPULATION REPORT

for the 198 countries of the world

(which excludes the 35 countries with “missing/bad” data)

POPULATION

Total: 3,123,456,789

China has the largest population: 1,388,232,693 people

Antigua and Barbuda has the smallest population: 93,659 people

LAND AREA

Total: 123,456,789 sq miles (= 234,567,890 sq km)

Russia has the biggest area: 6,592,769 sq miles (= 17,075,200 sq km)

XYZ has the smallest area: 2 sq miles (= 4 sq km)

MEDIAN AGE

Average: 28

Niger has the youngest: 15

Japan has the oldest: 47

MIGRANTS

Number of countries with

NEGATIVE (outgoing) migration:

500,000 or more 02

Between 100,000 and 499,999 09

Between 30,000 and 99,999 23

Between 10,000 and 29,999 33

Between 1 and 9,999 55

ZERO migration: 05

POSITIVE (incoming) migration:

500,000 or more 01

Between 100,000 and 499,999 14

Between 30,000 and 99,999 14

Between 10,000 and 29,999 09

Between 1 and 9,999 33

URBAN POPULATION

A number of countries with %-urban in these ranges:

Less than 25% 35

Between 25.1% and 50% 48

Between 50.1% and 75% 82

Between 75.1% and 90% 14

Greater than 90% 32


Related Questions in economics category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.