Professional Documents
Culture Documents
Bse 183085
Bse 183085
#include <iostream>
#include <string>
class polygon
private:
float length;
float *width;
public:
polygon(float l, float w)
length = l;
width = new float;
*width = w;
void display()
void setvalue()
*width = 22.9;
float get_length()
{
return length;
float get_width()
return *width;
};
int main()
obj1.display();
obj1.setvalue();
system("pause");
OUTPUT