#include <iostream>
using namespace std; // consider removing this line in serious projects
class Rectangle{
private:
double width;
double length;
public:
void setWidth(double);
void setLen(double);
double getWidth() const;
double getLen() const;
double getArea() const;
};
void Rectangle::setWidth(double x){
width = x;
}
void Rectangle::setLen(double y){
length = y;
}
double Rectangle::getWidth() const{
return width;
}
double Rectangle::getLen() const{
return length;
}
double Rectangle::getArea() const{
return length * width;
}
int main() {
Rectangle bruh;
bruh.setLen(2);
bruh.setWidth(1.5);
cout << "The area of your rectangl is: " << bruh.getArea();
cout << endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOyAvLyBjb25zaWRlciByZW1vdmluZyB0aGlzIGxpbmUgaW4gc2VyaW91cyBwcm9qZWN0cwoKY2xhc3MgUmVjdGFuZ2xlewoJcHJpdmF0ZToKCQlkb3VibGUgd2lkdGg7CgkJZG91YmxlIGxlbmd0aDsKCXB1YmxpYzoKCQkgdm9pZCBzZXRXaWR0aChkb3VibGUpOwoJCSB2b2lkIHNldExlbihkb3VibGUpOwoJCSAKCQkgZG91YmxlIGdldFdpZHRoKCkgY29uc3Q7CgkJIGRvdWJsZSBnZXRMZW4oKSBjb25zdDsKCQkgZG91YmxlIGdldEFyZWEoKSBjb25zdDsKfTsKCnZvaWQgUmVjdGFuZ2xlOjpzZXRXaWR0aChkb3VibGUgeCl7Cgl3aWR0aCA9IHg7Cn0KCnZvaWQgUmVjdGFuZ2xlOjpzZXRMZW4oZG91YmxlIHkpewoJbGVuZ3RoID0geTsKfQoKZG91YmxlIFJlY3RhbmdsZTo6Z2V0V2lkdGgoKSBjb25zdHsKCXJldHVybiB3aWR0aDsKfQoKZG91YmxlIFJlY3RhbmdsZTo6Z2V0TGVuKCkgY29uc3R7CglyZXR1cm4gbGVuZ3RoOwp9Cgpkb3VibGUgUmVjdGFuZ2xlOjpnZXRBcmVhKCkgY29uc3R7CglyZXR1cm4gbGVuZ3RoICogd2lkdGg7Cn0KCmludCBtYWluKCkgewoJUmVjdGFuZ2xlIGJydWg7CgkKCWJydWguc2V0TGVuKDIpOwoJYnJ1aC5zZXRXaWR0aCgxLjUpOwoJCgljb3V0IDw8ICJUaGUgYXJlYSBvZiB5b3VyIHJlY3RhbmdsIGlzOiAiIDw8IGJydWguZ2V0QXJlYSgpOwoJY291dCA8PCBlbmRsOwoJCn0=