remember when told you that programs "do things with stuffin and in simple termsclasses are just way to define new sorts of stuffreflecting real objects in program' domain for instancesuppose we decide to implement that hypothetical pizza-making robot we used as an example in if we implement it using classeswe can model more of its real-world structure and relationships two aspects of oop prove useful hereinheritance pizza-making robots are kinds of robotsso they possess the usual robot- properties in oop termswe say they "inheritproperties from the general category of all robots these common properties need to be implemented only once for the general case and can be reused in part or in full by all types of robots we may build in the future composition pizza-making robots are really collections of components that work together as team for instancefor our robot to be successfulit might need arms to roll doughmotors to maneuver to the ovenand so on in oop parlanceour robot is an example of compositionit contains other objects that it activates to do its bidding each component might be coded as classwhich defines its own behavior and relationships general oop ideas like inheritance and composition apply to any application that can be decomposed into set of objects for examplein typical gui systemsinterfaces are written as collections of widgets--buttonslabelsand so on--which are all drawn when their container is drawn (compositionmoreoverwe may be able to write our own custom widgets--buttons with unique fontslabels with new color schemesand the like--which are specialized versions of more general interface devices (inheritancefrom more concrete programming perspectiveclasses are python program unitsjust like functions and modulesthey are another compartment for packaging logic and data in factclasses also define new namespacesmuch like modules butcompared to other program units we've already seenclasses have three critical distinctions that make them more useful when it comes to building new objectsmultiple instances classes are essentially factories for generating one or more objects every time we call classwe generate new object with distinct namespace each object generated from class has access to the class' attributes and gets namespace of its own for data that varies per object this is similar to the per-call state retention of ' closure functionsbut is explicit and natural in classesand is just one of the things that classes do classes offer complete programming solution oopthe big picture