Part of the problem is that the word has two meanings. There is the object meaning of in the general sense as the word in object object object oriented There is also a more technical meaning which helps to distinguish programming. between a and an and furthermore between a and an class object, class method object method. Right now your understanding about this business should be that an object object is some type of structure, or container that holds information like integers, characters, strings or more complex information. We can call this information An object stores more than data, because data by itself lacks all data. functionality. We want to alter data, display data, sort data, search data or perform many other data processes. All these actions on the object’s data are performed by other object members, modules that have the ability to process data. The corner stone of objects is this business of packing both the data and various modules that process the data in the same container. Now in Chapter IV, you used a variety of methods that processed data. You saw methods capable of computing the square root, absolute value, and other mathematical computations. All these methods are called class methods. Somehow this implies that a can also hold action modules, just like an class object. It probably all sounds very confusing. Most people are trial confused at the first introduction to all the new vocabulary words in computer science. This chapter will start by clarifying the difference between a class and an object and then continue to show you how to use object methods. 6.2 Classes and Objects The word implies a collection of some category. In high school there may class be a French class, a Geometry class, an Art class and a Computer Science class. A French class is not the same as a Geometry class, but you would expect first period Geometry to be quite similar to second period Geometry. You can of a class as a category, as a blue print, as a general description. You are surrounded by A a a a a a classes. cat, dog, car, student, soldier, a a a are just a few of the many classes that exist physician, teacher, mother, baby in your world. Now notice that none of these classes are specific. We all know what a cat is, but it is a general statement; unlike which is a specific cat Fluffy, you can see and pet. In this example is a and is an cat class Fluffy object.
Part of the problem is that the word object has two meanings. There is the meaning of object in the general sense as the word object in object oriented programming. There is also a more technical meaning which helps to distinguish between a class and an object, and furthermore between a class method and an object method. Right now your understanding about this object business should be that an object is some type of structure, or container that holds information like integers, characters, strings or more complex information. We can call this information data. An object stores more than data, because data by itself lacks all functionality. We want to alter data, display data, sort data, search data or perform many other data processes. All these actions on the object’s data are performed by other object members, modules that have the ability to process data. The corner stone of objects is this business of packing both the data and various modules that process the data in the same container. Now in Chapter IV, you used a variety of methods that processed data. You saw methods capable of computing the square root, absolute value, and other mathematical computations. All these methods are called class methods. Somehow this implies that a class can also hold action modules, just like an object. It probably all sounds very confusing. Most people are confused at the first introduction to all the new vocabulary words in computer science. This chapter will start by clarifying the difference between a class and an object and then continue to show you how to use object methods. 6.2 Classes and Objects The word class implies a collection of some category. In high school there may be a French class, a Geometry class, an Art class and a Computer Science class. A French class is not the same as a Geometry class, but you would expect first period Geometry to be quite similar to second period Geometry. You can of a class as a category, as a blue print, as a general description. You are surrounded by classes. A cat, a dog, a car, a student, a soldier, a physician, a teacher, a mother, a baby are just a few of the many classes that exist in your world. Now notice that none of these classes are specific. We all know what a cat is, but it is a general statement; unlike Fluffy, which is a specific cat you can see and pet. In this example cat is a class and Fluffy is an object. trial