This chapter introduced you to the principles of object-oriented programming. You have learned how to create classes in Python, and how to use them to organize your code. We also touched on some general software engineering principles, including the concept of unit testing. Specifically, we:
Defined classes to represent an armoured fighting vehicle
Used inheritance to represent other types of military vehicles
Organized the class definitions into modules
Created a package to contain our modules
Learned how to handle exceptions
Defined our own exceptions specific to the Vehicle and Tank classes
Created unit tests to make sure our classes are working correctly
Now, we'll move on to some advanced techniques to help you get the most out of Sage.