17 lines
300 B
JavaScript
17 lines
300 B
JavaScript
class Rack{
|
|
constructor(noOfShelf, typOfProduct) {
|
|
this.noOfShelf = noOfShelf;
|
|
}
|
|
|
|
addShelf(){
|
|
this.noOfShelf = this.noOfShelf + 1;
|
|
}
|
|
|
|
isEmpty(){
|
|
if (this.noOfShelf === 0){
|
|
return true;
|
|
}else {
|
|
return false;
|
|
}
|
|
}
|
|
} |