So here’s a simplified but mostly complete UML diagram describing the classes, what they contain and how they interact for our BlackJack project:
While this implementation is far from perfect, it has hopefully shown you what Object-Oriented programming is all about. Here are some final pointers to help with any future OO projects:
- Contemplate the project from a real world perspective first, what real objects exist in this project?
- How could you make your classes reusable in other projects?
- Consider making a UML diagram, even something simple will give you a good overview of the project.
- Hide your fields from the world as much as possible.
And with that, we’re done. If you’ve enjoyed getting your feet wet then why don’t you have a crack at Android App Development which is the next logical step!