Do I correctly understand what a class is?
        Posted  
        
            by Matt
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Matt
        
        
        
        Published on 2010-03-21T00:44:20Z
        Indexed on 
            2010/03/21
            0:51 UTC
        
        
        Read the original article
        Hit count: 383
        
I've had trouble finding a clear, concise laymans definition of a class. Usually, they give general ideas without specifically spelling it out, and I'm wondering if I'm understanding this correctly. As I understand it, a class is the set of code that controls an object. For example, in an app that has a button for 'Yes' and a button for 'No', and a text box for output, the code that tells the computer what to do when the user uses the Yes button is one class, the code for hitting No is another class, and an object is the two buttons and what they do together to influence the output box. Am I right, or am I confusing terms here?
Thanks
© Stack Overflow or respective owner