In this final section we will add functions to our module so that we can manage our fields successfully. These functions include:
- automatically grow field
- manually grow field
- display available crops
- display available animals
The video below demonstrates how to add these functions:
Use the above video to help you add the necessary functions to manage the field class.
This series of tutorials has focused on developing your understanding of object-oriented programming and simulations through the development of practical examples: crops, animals and fields. You should now be reasonably comfortable with most of the main concepts, including:
- Attributes (public and private)
- Methods (public and private)
Like anything new if you do not make use of the concepts and skills you have developed they will fade. You should start thinking about developing your own object-oriented projects to make use of these skills. If you continue to practice eventually these skills will become second nature.
If you have no idea where to go next then why don't you consider continuing the development of this simulation - we only developed it as far as fields, there is a whole farm that you could focus on next.
One last thing...we make use of all of these classes again in the event-driven programming series of tutorials where we learn how to add graphical user interfaces to programs in Python using the PyQt4 framework.
- Previous - Further Field Methods