# Rectangle.cpp ```cpp= #include<stdio.h> class Rectangle { // 定義一個 Rectangle 類型 public: int width; int height; int area() { return width * height; } }; int main() { Rectangle r; // 宣告一個 Rectangle 「物件」,名字叫做 r r.width = 3; r.height = 4; printf("%d\n", r.area()); return 0; } ```