https://github.com/fivethreeeo/shapefactory
https://github.com/fivethreeeo/shapefactory
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fivethreeeo/shapefactory
- Owner: fivethreeeo
- Created: 2023-02-07T10:18:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-07T10:20:51.000Z (about 3 years ago)
- Last Synced: 2023-08-04T19:25:35.115Z (over 2 years ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
- 클래스 상속(확장) 연습
#### 실행
```js
node app
```
#### 구조
- `app.js` : 프로그램 실행
- `class: Console` : 프로그램을 돌리는 콘솔. 입력된 명령어를 `ShapeFactory`에게 실행 요청, 결과 값을 `printer`로 출력 요청
- `class: ShapeFactory` : `Console`에서 요청받은 명령어를 실행.
- `class: Shape` : shape의 최상위 클래스. `Point`, `Line`, `Triangle`, `Rectangle`, `Polygon` 을 자식 클래스 갖는다.
- `printer.js` : 출력기 모음