class Rack{ constructor(noOfShelf) { this.noOfShelf = noOfShelf; } addShelf(){ this.noOfShelf = this.noOfShelf + 1; } isEmpty(){ if (this.noOfShelf === 0){ return true; }else { return false; } } }