-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26acc05
commit 3398132
Showing
1 changed file
with
16 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
import { Phone } from './phone'; | ||
import { Cat } from './cat'; | ||
|
||
const first = new Phone('+7900-000 000 (123)', 1990, 'Телефон 1'); | ||
first.year = 1998; | ||
const Cat1 = new Cat (7, 'Кеша', 'Шотландский вислоухий'); | ||
Cat1.Age = 7; | ||
Cat1.Weight = 5; | ||
Cat1.Breed = 'Шотландский вислоухий'; | ||
|
||
first.year = -1998; | ||
first.call('12345'); | ||
first.endCall(); | ||
const Cat2 = new Cat (undefined, 'Кисик', 'Британский'); | ||
Cat2.Age = 6; | ||
Cat2.Weight = 7; | ||
Cat2.Breed = 'Британский'; | ||
|
||
const second = new Phone('+799900000', -5); | ||
// second.name = 'Телефон 2'; | ||
console.log(second.year); | ||
second.call('12345'); | ||
second.endCall(); | ||
const Cat3 = new Cat (15, 'Юми', 'Русский голубой'); | ||
Cat2.Age = 3; | ||
Cat2.Weight = 4; | ||
Cat2.Breed = 'Русский голубой'; | ||
|
||
console.log(first, second, Phone.phoneCount); | ||
console.log(Cat1.getInfo()) | ||
console.log(Cat2.getInfo()) | ||
console.log(Cat3.getInfo()) |