The main idea behind object-oriented programming is to help write more reliable software. Smaller programs are easier to write and understand than larger programs, which is why programmers divide large programs into multiple, smaller functions. Every program consists of data to manipulate and algorithms that provide step-by-step instructions for manipulating that data.
One problem with functions is that they isolate algorithms, but each function can potentially ...