Question: Write a class called Shelf that contains instance data that represents the length, breadth, and capacity o t e shelf. Also include Boolean variable called
Write a class called Shelf that contains instance data that represents the length, breadth, and capacity o t e shelf. Also include Boolean variable called occupied as data that represents whether the shell is occupied or not. Define the Shelf constructor to accept and initialize the height, width, and capacity of the shelf. Each newly created Shelf is vacant (the constructor should initialize occupied to false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
