I'm working on a homework set. Here is the question I am having trouble with.
Suppose that you want to make a copy of a City instance. This can be done with a public constructor that takes a City instance as a parameter, and makes an exact replica of the orginal instance. It constructs this copy using getName and getPopulation methods.
The new City instance should have the same name and population values as the City instance that is passed to the constructor as a parameter. The City object that is passed as a parameter should not be modified.
Here is my code so far:
Am I even using the right method? How do I write this?
Thanks in advance.