좋은 객체지향의 5가지 원칙 (SOLID)

SRP: 단일 책임 원칙

(single responsibility principle)

OCP: 개방-폐쇄 원칙

(Open/closed principle)

"가장 중요한 원칙"

앞의 코드 예제를 다시 봅시다.