consolidate all repos to one for archive

This commit is contained in:
2025-01-28 13:46:42 +01:00
commit a6610fbc7a
5350 changed files with 2705721 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#ifndef EXAMPLE14_RECTANGLE_H
#define EXAMPLE14_RECTANGLE_H
#include <iostream>
class Rectangle : public Shape {
private:
int w, h;
public:
Rectangle() : Shape(), w(0), h(0) {
}
Rectangle(int x, int y, int w, int h) : Shape(x, y), w(w), h(h) {
}
double area() const {
return w*h;
}
void print() const {
std::cout << "Rectangle(" << x << ", " << y << ", " <<
w << ", " << h << ")" << std::endl;}
};
#endif //EXAMPLE14_RECTANGLE_H