Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class LebronJames impliments Human{
- public firstName: string = "Lebron"
- public lastName: string = "James"
- public occupation: string = "All-Time Great NBA Player"
- // notice below this field wasn't mention in the human interface
- private numOfChampionships: number = 3
- greet = (name: string): string => {
- return`Hey ${this.firstname} ${this.lastName}, nice to meet you.`
- }
- walk = (): string => {
- return "I'm going to have a nice walk near Staples Center with my 3 rings"
- }
- introduce = (): string => {
- return `my name is ${this.firstName} ${this.lastName}, i play for the Lakers`
- }
- // notice how this method also wasn't listed in the interface
- bragAboutRings = (): string => {
- return `yeah i got like ${this.numOfChampionships} rings or whatever, not a big deal`
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement