import std.stdio;

class Box { 
   protected: 
      double width; 
} 

class SmallBox:Box  { // SmallBox is the derived class. 
   public: 
      double getSmallWidth() { 
         return width ; 
      }

      void setSmallWidth( double wid ) {
         width = wid; 
      } 
} 

void main( ) { 
   SmallBox box = new SmallBox();  

   // set box width using member function 
   box.setSmallWidth(5.0); 
   writeln("Width of box : ", box.getSmallWidth()); 
}