title: Abstract class inherits method and attributes from another class
body: <p>I'm trying to make a class called <code>RoomBase</code> and it has an abstract method and two attributes, I need to make my program work so the <code>RoomBase</code> class inherits everything that the <code>getRoomDetailsFromUser()</code> does in the <code>Room</code> class.</p>
  
  <p><code>RoomBase</code> class:</p>
  
  <pre class="lang-java prettyprint-override"><code>public abstract class RoomBase {
  
      public abstract void getRoomDetailsFromUser();
      private int roomNumber;
      private int NumberOfSeats;
  }
  </code></pre>
  
  <p><code>Room</code> class:</p>
  
  <pre class="lang-java prettyprint-override"><code>public abstract class Room implements Bookable {
      Scanner input = new Scanner(System.in);
      private static int roomNumber;
      private static int numberOfSeats;
      private static String reservedBy = "";
      private static boolean reserved;
      private static boolean hasSmartBoard;
  
      /**
       * Get the attribute values from the user.
       */
  
      public Room(int roomNumber) {
          this.roomNumber = roomNumber;
  
      }
  
      public void getRoomDetailsFromUser() {
  
          System.out.print("Enter number of seats: ");
          numberOfSeats = input.nextInt();
          input.nextLine();
          System.out.print("Does this classroom have a smart board? (Y/N)");
          hasSmartBoard = input.nextLine().equalsIgnoreCase("y");
  
      }
  
      public boolean isHasSmartBoard() {
          return hasSmartBoard;
      }
  
      public void setHasSmartBoard(boolean hasSmartBoard) {
          this.hasSmartBoard = hasSmartBoard;
      }
  
      public static int getNumberOfSeats() {
          return numberOfSeats;
      }
  
      public void setNumberOfSeats(int numberOfSeats) {
          this.numberOfSeats = numberOfSeats;
      }
  
      public String getReservedBy() {
          return reservedBy;
      }
  
      public void setReservedBy(String reservedBy) {
          this.reservedBy = reservedBy;
      }
  
      public boolean isReserved() {
          return reserved;
      }
  
      public void setReserved(boolean reserved) {
          this.reserved = reserved;
      }
  
  
      public int getRoomNumber() {
          return roomNumber;
      }
  
      /**
       * Update the room to reserved and get the reserved by.
       */
  
      public void reserveThisRoom(){
          this.reserved = true;
          System.out.println("Enter the name of the person reserving this room: ");
          reservedBy = input.nextLine();
      }
  
       /**
       * Update the room to not reserved and clear the reserved by.
       */
  
      public void releaseThisRoom(){
          this.reserved = false;
          reservedBy = "";
          System.out.println("Room has been released\n");
      }
  
      public String toString() {
          String output = "\n\n******************************"
              + "\nRoom Number: " + roomNumber
              + "\nNumber of Seats: " + numberOfSeats
              + "\nReserved By: " + reservedBy
              + "\nReserved: " + reserved
              + "\nSmart Board: "+ hasSmartBoard;
          return output;
      }
  }
  </code></pre>