• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 6. Customizing Objects > DEFINING A CUSTOM CLASS AND CREATING INSTANCES...

DEFINING A CUSTOM CLASS AND CREATING INSTANCES OF THAT CLASS

Up to now, we’ve been using an instance of the generic Object object to demonstrate the way our person1 object works. Now it’s time to move to the next level of object mechanics: Creating a custom class—which in this exercise we’ll define as the Person class. This class will serve as the blueprint for creating new instances of people, representing a more efficient way of creating and defining person1 .

NOTE

We used the Object object in the above exercises primarily to illustrate the concept of objects. The Object object has many viable uses in regular projects; however, it’s a general solution and one that may not be suitable for every application.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint