Class MessageView
Object
MessageView
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPrints a message to console then returns next line of input from user using the Scanner.Returns the string form of an OpenMessage object passed in.void
Prints the menu for user.
-
Field Details
-
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
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
Returns the string form of an OpenMessage object passed in.- Parameters:
m
- OpenMessage to be converted to a String- Returns:
- string message
-