-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First pull request #15
base: Lebedev_Egor_Andreevich
Are you sure you want to change the base?
First pull request #15
Conversation
public price: number; | ||
constructor(name: string, price: number){ | ||
this.name = name; | ||
this.price = price; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я могу создать сервис с отрицательной ценой ....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
добавляйте set и get и используйте их в конструкторе
|
||
constructor(name: string, price: number, public mass?:number){ | ||
super(name, price) | ||
this.mass = mass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
значит я могу отрицательные значения mass выставить?
} | ||
|
||
deleteIngredient(ingredient: string | number){ | ||
if (typeof ingredient == "string"){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вот это может вести к 2 методам DeleteByID и DeleteByName
Сделано 1 задание на классы. Сделано наследование. Сделаны первые тесты (ожидается больше). Удален класс (Phone) и все связанное с ним. Начато задание RPG Saga (пока не смотреть, так как есть проблема с линтерами)