Question

In: Computer Science

Class object in C++ programming language description about lesson inheritance example.

Class object in C++ programming language description about lesson inheritance example.

Solutions

Expert Solution

#include

#include

#include

#include

using namespace std;

 

class shap{

  protected:

    int x,y;

  public:

    shap(int xx, int yy)

    :x(xx),y(yy){}

    void setx(int xx){

      x=xx;

    }

    void sety(int yy){

      y=yy;

    }

    int getx(int xx)const{

      return xx;

    }

    int gety(int yy)const{

      return yy;

    }

};

class circle: public shap{

  protected:

    float r;

  public:

    circle(int xx,int yy)

    :shap(xx,yy){}

    float area_cir(float ar){

      ar=r*r*3.14;

      return (ar);

    }

    void input_cir(){

      float ra;

      r=ra;

      cout<

Related Solutions

Class object in C++ programming language description about lesson inheritance example.
Class object in C++ programming language description about lesson inheritance example.
Class object in C++ programming language description about lesson inheritance multi level example.
Class object in C++ programming language description about lesson inheritance multi level example.
Class object in C++ programming language description about lesson Overloading function example.
Class object in C++ programming language description about lesson Overloading function example.
Class object in C++ programming language description about lesson copy constructor example.
Class object in C++ programming language description about lesson copy constructor example.
Class object in C++ programming language description about lesson static variable example.
Class object in C++ programming language description about lesson static variable example.
Class object in C++ programming language description about lesson base class and derived class example.
Class object in C++ programming language description about lesson base class and derived class example.
Class object in C++ programming language description about lesson unary overloading function example.
Class object in C++ programming language description about lesson unary overloading function example.
Code in C++ programming language description about chose favorite fruit and wage color of fruit in lesson Class object (Multiple class).
Code in C++ programming language description about chose favorite fruit and wage  color of fruit in lesson Class object (Multiple class).
Code in C++ programming language description about lesson Calculator (multiple, sum, dived, sub) example.
Code in C++ programming language description about lesson Calculator (multiple, sum, dived,  sub) example.
Code in C++ programming language description about read and write data to memory example.
Code in C++ programming language description about read and write data to memory example.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT