CLASSES IN C++

A house is to a blueprint as an object is to a class.

Definitions:
         class:
             A class consists of variables and functions.
                     variables are called fields or data members.
                     functions are called methods or function members.
                     functions act on the fields.  functions update information of variables.

            class MyClass
     {
       public:
           MyClass()
           {
                   ...
           }
//default constructor
           bool myMethod1 (int score)
           {
                   ...
           }
// method myMethod1
        private:
            string myField1;
            int myField2;
      };
//class MyClass


class Boy
{
  private:
     float Height, Weight;
  public:
   
//Constructor
    Boy(float Hei=0, float Wei=0);       
    void Grow(float H1);
    void Print(void);
    void Read(void);

};


                object:
                     An object is a variable whose type is a class.
                     An object has the fields and can call the methods of its class.
                     An object is sometimes called an instance of its class.
     MyClass myObject1,
             myObject2;

     if(myObject1.myMethod1(47))
        cout<<myObject2.myMethod1(8);

   Boy Austin(77,120),Roger;
   Austin.Print();
   Austin.Grow(10);
   Austin.Print();
   Roger.Read();
   Roger.Print();