1.1-Introductie-Programmeren

Importing lots of persons

Difficulty: Filled Filled Outlined

Examine the phonebook.csv we provided (note there is a header on line 1). Now create (instantiate) a Person class for each line (except first header line) from the csv with person data. Place the Person objects in a suitable List. This allows you to do the following:

Once you have completed this, add a printPeopleFrom method that allows you to print all persons that live in a certain city. (Note the example shows all people living in “Bovenkarspel”.)

The phonebook has been generated from random data.

Example

Example

(Note, these people living in Bovenkarspel.) Example