In object-oriented programming the focus is on objects. We identify the objects that we will need to accomplish a task. We determine a type for those objects (classify them) and write a class definition for each type. The class definition contains information on the data for each object (the fields), the different ways to initialize the data for each new object (the constructors), and the things objects will need to know how to do (the methods). Up to now we have only written methods, but now we will write entire classes. Each class will have fields, constructors, and methods. |