This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Folders & file drawers objects and classes In a dentist office, you are likely to see file drawers filled with manila folders. The file drawer named Patient contains one manila folder for each patient, with each manila folder in the file drawer containing the same kind of information. Here, we see that manila folder a0 contains Jack Smiths name, address, and the amount he owes. In a real dentist office, the folder would contain much more information. The file drawer is like a class in object-oriented programming. And the manila folders in the file drawer are called objects , or instances of the class. Each manila folder, or object, has a name on its tab, which identifies it. Drawing objects Throughout this course, we will need to draw manila folders, or objects, in order to explain various concepts, and you may have to draw such objects, too, when you are trying to find a bug in a program or to explain something to another person. For efficient communication, we must all use the same form of an object. explain something to another person....
View Full Document
This note was uploaded on 07/07/2008 for the course CS 101 taught by Professor Gries during the Spring '08 term at Cornell University (Engineering School).
- Spring '08