Skip to content

Files

Latest commit

4b42b88 · Jul 22, 2020

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 22, 2020
Jul 22, 2020

Factory Coding Exercise

You are given a class called Person . The person has two attributes: id , and name .

Please implement a PersonFactory that has a non-static create_person() method that takes a person's name and return a person initialized with this name and an id.

The id of the person should be set as a 0-based index of the object created. So, the first person the factory makes should have Id=0, second Id=1 and so on.