Create the shoutbox class-returns a string type


Discuss the below:

Q: You will create the ShoutBox class for your Virtual World. Your ShoutBox class will have a shoutOutCannedMessage() method that returns a String type. The shoutOutCannedMessage will use an Array or an ArrayList to store 10 messages of type String. For those of you that are more advanced with your Java skills, you could use a HashMap for the data structure. You can load this data structure with 10 messages of your choosing. For example, one message could be "I need Java!" You can initialize your Array or ArrayList with the messages or have the user enter the messages. The choice is yours. The shoutOutCannedMessage() will loop through the data structure to first display all canned messages and allow the user to select one. The shoutOutCannedMessage() will return the selected message String. Take a screenshot to verify that the selected message String is displayed successfully

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create the shoutbox class-returns a string type
Reference No:- TGS01934097

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)