forked from s444420/AL-2020
17 lines
286 B
JavaScript
17 lines
286 B
JavaScript
|
class Rack{
|
||
|
constructor(noOfShelf) {
|
||
|
this.noOfShelf = noOfShelf;
|
||
|
}
|
||
|
|
||
|
addShelf(){
|
||
|
this.noOfShelf = this.noOfShelf + 1;
|
||
|
}
|
||
|
|
||
|
isEmpty(){
|
||
|
if (this.noOfShelf === 0){
|
||
|
return true;
|
||
|
}else {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
}
|