+
The ShoutBox object will allow you to shout messages into your virtual world...

The ShoutBox object will allow you to shout messages into your virtual world...

Rating:
Rating
(0)
Author: Jean Brunner
Description:

Click llink for more description 

The ShoutBox object will allow you to shout messages into your virtual world. Your ShoutBox will have two ways of generating messages:

http://homework.plus/the-shoutbox-object-will-allow-you-to-shout-messages-into-your-virtual-world-your-shoutbox-will-have-two-ways-of-generating-messages/

Specifications for ShoutBox:
The ShoutBox object will allow you to shout messages into your virtual world. Your ShoutBox will have two ways of generating messages:
 
You can select from a list of canned messages to shout, or
You can have the ShoutBox generate a random message for you.
You must use data structures Array, ArrayList, or a HashMap to store the message data.
Canned messages: One data structure will store the canned messages. You can load this data structure with canned messages of your choosing. The shoutOutCannedMessage() method 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. This String will be displayed in the virtual world. For now, your virtual world will be the output window.
Random messages: To generate random messages, you need to have a data structure that holds a list of subjects, another data structure that holds a list of objects, another that holds a list of verbs, another that holds a list of adverbs, and another that holds a list of adjectives. The lists you create can hold as many words as you would like. The shoutOutRandomMessage() method will use a random number generator that selects one word from each data structure to form a random message. Random messages will be in the following form: Subject - Verb - Adjective - Object - Adverb.
The generated message String will be returned. The String will be displayed by the ShoutBox in the virtual world. For now, your virtual world will be the output window.
Partial class diagram for the ShoutBox object:


(more)
See More
Try a College Course Free

Sophia’s self-paced online courses are a great way to save time and money as you earn credits eligible for transfer to over 2,000 colleges and universities.*

Begin Free Trial
No credit card required

25 Sophia partners guarantee credit transfer.

221 Institutions have accepted or given pre-approval for credit transfer.

* The American Council on Education's College Credit Recommendation Service (ACE Credit®) has evaluated and recommended college credit for 20 of Sophia’s online courses. More than 2,000 colleges and universities consider ACE CREDIT recommendations in determining the applicability to their course and degree programs.

Tutorial