Class MessageView

Object
MessageView

public class MessageView extends Object
  • Field Details

    • scanner

      private final Scanner scanner
  • Constructor Details

    • MessageView

      public MessageView()
  • Method Details

    • printMenu

      public void printMenu()
      Prints the menu for user. Should welcome the user to the Wonderland Messenger. Then it should convey to the user that inputting "s" means search for a message, and "x" means exit the program.
    • getInput

      public String getInput(String msg)
      Prints a message to console then returns next line of input from user using the Scanner. Feel free to look at previous labs' implementations of this method for guidance.
      Parameters:
      msg - message to print to console
      Returns:
      next line of user input
    • messageToString

      public String messageToString(OpenMessage m)
      Returns the string form of an OpenMessage object passed in.
      Parameters:
      m - OpenMessage to be converted to a String
      Returns:
      string message