Skip to content

resolução exercício prototype II - Katiene Souza#30

Open
katiene-souza wants to merge 1 commit into
reprograma:masterfrom
katiene-souza:master
Open

resolução exercício prototype II - Katiene Souza#30
katiene-souza wants to merge 1 commit into
reprograma:masterfrom
katiene-souza:master

Conversation

@katiene-souza

Copy link
Copy Markdown

No description provided.

@debbsgomes debbsgomes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Congrats!!

this.consultations.reverse();
};

toFeed(animal, food) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Interessante, não pensei em fazer dessa forma, coloquei alimentar() na superclasse, mas só fiz a logica especifica de alimentar do gato e papagaio nas classes dos próprios animais, sério, não usei instanceof hora nenhuma, vou anotar, rs. Parabéns.

};
};

class Domestic extends Animal {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bom uso de polimorfismo e abstração.

this.speak();
};
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Não muito a acrescentar, código bem feito, atende ao proposito do exercício pelo que vi, eu só teria tentando refatorar e diminuir as linhas por conta do meu toc, rs

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