C++ Programming Ch.10 Exercise 15 Solution
Problem: vectorλ₯Ό μ΄μ©νμ¬ μλ Circle ν΄λμ€μ κ°μ²΄λ₯Ό μ½μ νκ³ μμ νλ νλ‘κ·Έλ¨μ μμ±νλΌ. μμ μμλ μ΄λ¦μ΄ κ°μ λͺ¨λ μμ μμ νλ€. 1 2 3 4 5 6 7 8 9 10 class Circle { string name; // μ΄λ¦ int radius; // λ°μ§λ¦ public: Circle(int radius, string name) { this->radius = radius; this->name = name; } double getArea() { return 3.14*radius*radius; } string getName() { return name; } }; Execution Result: ...