object-oriented programming about year or so after started programmingi decided to make game to play wheel of fortune wrote the program in the basic programming language and it got to be pretty largea couple thousand lines it mostly workedbut whenever tried to fix somethingmy fix would break something in completely different part of the program would then fix that and break something else eventually got the program workingbut after while was afraid to even touch it the problem with the program was that each part of the program had access to the variables from the other parts change of variable in one part would mess up things in the others one solution to this type of problem is object-oriented programming one of its chief benefits is encapsulationwhere you divide your program into pieces and each piece internally operates independently of the others the pieces interact with each otherbut they don' need to know exactly how each one accomplishes its tasks this requires some planning and set-up time before you start your programand so it is not always appropriate for short programslike many of the ones that we have written so far we will just cover the basics of object-oriented programming here object-oriented programming is used extensively in software design and would recommend picking up another book on programming or software design to learn more about designing programs in an object-oriented way python is objected-oriented python is an object-oriented programming languageand we have in fact been using many objectoriented concepts already the key notion is that of an object an object consists of two thingsdata and functions (called methodsthat work with that data as an examplestrings in python are objects the data of the string object is the actual characters that make up that string the methods are things like lowerreplaceand split in pythoneverything is an object that includes not only strings and listsbut also integersfloatsand even functions themselves