Skip to content

Conversation

CBEPXPA333YM
Copy link

Сделано 1 задание на классы. Сделано наследование. Сделаны первые тесты (ожидается больше). Удален класс (Phone) и все связанное с ним. Начато задание RPG Saga (пока не смотреть, так как есть проблема с линтерами)

public price: number;
constructor(name: string, price: number){
this.name = name;
this.price = price;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я могу создать сервис с отрицательной ценой ....

Copy link
Contributor

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
Copy link
Contributor

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"){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

вот это может вести к 2 методам DeleteByID и DeleteByName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants