Index: typescript/src/index.ts =================================================================== diff -u -re981fb5b18ea68705478a7b16d62c5eb64614e7a -rfa30bc920677c99798fd0d29670c4ad28f83c4c2 --- typescript/src/index.ts (.../index.ts) (revision e981fb5b18ea68705478a7b16d62c5eb64614e7a) +++ typescript/src/index.ts (.../index.ts) (revision fa30bc920677c99798fd0d29670c4ad28f83c4c2) @@ -95,6 +95,6 @@ carExtImpl.sound(); carExtImpl.stop(); -const objExtCarImpl = new ObjExtCarImpl(); +const objExtCarImpl = new ObjExtCarImpl("이름","색상","모델"); console.log("<- 확장된 객체를 다시 확장한 인스턴스 사용 -> "); objExtCarImpl.start(); \ No newline at end of file Index: typescript/src/standard/CarExtImpl.ts =================================================================== diff -u -re981fb5b18ea68705478a7b16d62c5eb64614e7a -rfa30bc920677c99798fd0d29670c4ad28f83c4c2 --- typescript/src/standard/CarExtImpl.ts (.../CarExtImpl.ts) (revision e981fb5b18ea68705478a7b16d62c5eb64614e7a) +++ typescript/src/standard/CarExtImpl.ts (.../CarExtImpl.ts) (revision fa30bc920677c99798fd0d29670c4ad28f83c4c2) @@ -2,17 +2,18 @@ //CarExtImpl 클래스 선언 export default class CarExtImpl implements CarExt { + name = "K5" color = "white" car_name = "benz els 550" + sound(){ - console.log("그르르") + console.log(this.car_name + "그르르"); } start(){ console.log("출발") } - - stop(){ - console.log("정차") + stop = (): void => { + console.log("정차"); } } \ No newline at end of file Index: typescript/src/standard/ObjExtCarImpl.ts =================================================================== diff -u -re981fb5b18ea68705478a7b16d62c5eb64614e7a -rfa30bc920677c99798fd0d29670c4ad28f83c4c2 --- typescript/src/standard/ObjExtCarImpl.ts (.../ObjExtCarImpl.ts) (revision e981fb5b18ea68705478a7b16d62c5eb64614e7a) +++ typescript/src/standard/ObjExtCarImpl.ts (.../ObjExtCarImpl.ts) (revision fa30bc920677c99798fd0d29670c4ad28f83c4c2) @@ -3,4 +3,10 @@ //ObjExtCarImpl 클래스 선언 export default class ObjExtCarImpl extends CarExtImpl { + constructor(name: string, color: string, car_name: string) { + super(); + this.name = name; + this.color = color; + this.car_name = car_name; + } } \ No newline at end of file