title: Class 'Room' is abstract; cannot be instantiated
body: <p>I have an abstract class <code>Room</code> which has subclasses <code>Family</code> and <code>Standard</code>.</p>
  <p>I have created <code>room = new ArrayList&lt;Room&gt;();</code> within a <code>Hostel</code> class and a method to add a room to the ArrayList;</p>
  <pre><code>public String addRoom(String roomNumber, boolean ensuite)
  {
      if  (roomNumber.equals(&quot;&quot;)) 
          return &quot;Error - Empty name field\n&quot;;
      else
      
      room.add( new Room(roomNumber,ensuite) );
      return  &quot;RoomNumber: &quot; + roomNumber + &quot; Ensuite: &quot; + ensuite 
       + &quot;  Has been added to Hostel &quot; + hostelName;
  }
  </code></pre>
  <p>However I get the following compile time error;</p>
  <blockquote>
  <p>Room is abstract; cannot be instantiated</p>
  </blockquote>
  <p>I understand that abstract classes cannot be instantiated, but what is the best way to add a room?</p>