if I have Class Queue
class Queue {
pop () {
return 'Last value of Array'
}
}
and Class Stack
class Stack extends Queue {
@Override
pop () {
return 'First value of Array'
}
}
Is it breaking Liskov Substitution Principle? and why?
Aucun commentaire:
Enregistrer un commentaire