Created
November 15, 2015 20:01
-
-
Save samueleresca/c879b647fb0a95eabcc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="Vehicle.ts"/> | |
class Car extends Vehicle { | |
private _car_insurance: string; | |
private _license_plate: string; | |
constructor(brand: string, height: number, weight: number, car_insurance: string, license_plate: string) { | |
super(brand, height, weight); | |
this._car_insurance = car_insurance; | |
this._license_plate = license_plate; | |
} | |
get CarInsurance() { | |
return this._car_insurance; | |
} | |
set CarInsurance(car_insurance: string) { | |
this._car_insurance = car_insurance; | |
} | |
get LicensePlate() { | |
return this._license_plate; | |
} | |
set LicensePlate(license_plate: string) { | |
this._license_plate = license_plate; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment