• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Newb Question...

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So a class is the same thing as an object?
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Scott Batchelor:
So a class is the same thing as an object?


Nope. A class is a meta-object or pattern to create objects. Consider a class as you would a recipe. You have to combine the ingredients in the proper quantities and orders and then cook the results appropriately to create the objects (cookies?).
[ July 14, 2003: Message edited by: Michael Morris ]
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
also
"Person" is a class as it defines attributes a person can have like,
name, ssn, telephone number etc..
BUT "you" and "me" are "OBJECTS" of that Person class. so if somebody says that "a person should not insult another person" it doesn't point to any specific person but any person in general, right? BUT if we say- "maulin should not insult Scott" then it is meant for specific person instances maulin and scott which are objects.
class just says "which" information is there. object describes "what is the content" of that "which" information you know
Person class will say, it should have a name. Maulin object of that class says Person is maulin. Scott object of that class says, Scott is a person.
hope i didn't ditract you instead of helping...
regards
maulin
 
Scott Batchelor
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maulin,
Thanks... that is the clearest explanation I have had yet to date and I see the light.
Thanks Again.
Scott
 
reply
    Bookmark Topic Watch Topic
  • New Topic