Using the knowledge in computational language in C++ it is possible to write the code being write a class having two private variables
<h3>Writting the code in C++:</h3>
<em>#include <iostream></em>
<em>using namespace std;</em>
<em />
<em>class Rectangle { /*create a class named Rectangle*/</em>
<em />
<em> private:</em>
<em> float l,b; /*this class has two private variables l and b*/</em>
<em> public:</em>
<em> float getArea(float l, float b) /*this class has one member-function getArea which returns the area of the rectangle*/</em>
<em> {</em>
<em> return l*b; /*return the area of the rectangle*/</em>
<em> }</em>
<em />
<em>};</em>
<em />
<em />
<em>int main () { /*the main function to check the working of our Rectangle class*/</em>
<em />
<em> float l,b;</em>
<em> Rectangle r1; /*create an object r1 of Rectangle class*/</em>
<em> cout<<"Enter the length of the rectangle: ";</em>
<em> cin>>l; /*input the length of the rectangle from the user*/</em>
<em> cout<<"Enter the breadth of the rectangle: ";</em>
<em> cin>>b; /*input the breadth of the rectangle from the user*/</em>
<em> cout <<"Area of the rectangle is: "<< r1.getArea(l,b)<<" square units."; /*find the area of the rectangle using the member function of the class*/</em>
<em> return 0;</em>
<em>}</em>
See more about C++ at brainly.com/question/19705654
#SPJ1