Door.java - A class to represent a Door public class Door...

This preview shows page 1 out of 1 page.

// A class to represent a Doorpublic class Door{// Instance variables for name of the door// and whether the door is open or closedprivate String name;private String state;// Constructorpublic Door(String newName, String newState){name = newName;state = newState;}// Accessor for namepublic String getName(){return name;}// Accessor for statepublic String getState()

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture