07.캡슐화
레코드 캡슐화하기
const organization = { name: '애크미 구스베리', country: 'GB' };class Organization {
constructor(data) {
this._name = data.name;
this._country = data.country;
}
get name() { return this._name; }
set name(arg) { this._name = arg; }
get country() { return this._country; }
set country(arg) { this._country = arg; }
}컬렉션 캡슐화하기
기본형을 객체로 바꾸기
임시 변수를 질의 함수로 바꾸기
클래스 추출하기
클래스 인라인하기
위임 숨기기
중개자 제거하기
알고리즘 교체하기
Last updated