Summary

In this chapter, the challenge was to find a way to combine data from multiple sources. The solution for this is to make code that can take different types of data and transform it into a common type of object.

In order to achieve this, we first created two new Python classes. The first was the Geocache class, which represents a single geocache location and contains its coordinates, a name, and a description. The second was the PointCollection class, which represents a collection of Geocache objects. This class has the ability to import and convert the information from as many files as needed.

This technique that we used is called abstraction; its foundations reside in hiding complex procedures behind objects that can be easily understood by humans.

Finally, we integrated this new layer of abstraction into the application using class inheritance. The GeocachingApp class inherited the PointCollection, and in the end, it could behave similarly to any and both of them at the same time.

In the next chapter, while we will improve the application's capability to search for points, you will also learn other ways of combining classes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.37.20