-
-
Save ankitamasand/9f7bbf7a7dae4e7702b19e0a25f1e1c0 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
class TeslaModelSPrototype implements TeslaModelS { | |
length: number; | |
width: number; | |
wheelbase: number; | |
seatingCapacity: number; | |
private tempCache: string; | |
constructor (l, w, wb, sc) { | |
this.length = l; | |
this.width = w; | |
this.wheelbase = wb; | |
this.seatingCapacity = sc; | |
} | |
getTyrePressure () { | |
let tyrePressure = 20 // Evaluated after doing a few complex computations! | |
return tyrePressure | |
} | |
getRemCharging () { | |
let remCharging = 20 // Evaluated after doing a few complex computations! | |
return remCharging | |
} | |
} | |
let teslaObj = new TeslaModelSPrototype(196, 86, 116, 4) | |
console.log('Tyre Pressure', teslaObj.getTyrePressure()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment