A Supervised Machine Learning Approach Using Object-Oriented Programming Principles