Integrating new functionality into the application
In Chapter 2, The Geocaching App, we developed the application so that it could find points close to your location. However, the data was organized differently inside the application; although it was a very efficient way of handling data, it became very hard for us to understand how to perform operations on this data.
Through abstraction, we implemented a new form of data representation—one that is very intuitive and easy to use.
Now, we will change the application so that it can use this new type of data to perform its functions and also to aggregate the new capability of combining multiple sources of data.
Take a look at the GeocachingApp
and PointCollection
classes; you may notice that they have some parts that look similar to each other. Both of them store data and have methods to open data.
At this point, with little modification, if we transfer methods from one class to another, we could end up with a functional application, and...