Posted: November 7th, 2022
The ShoutBox object will allow you to shout messages into your virtual world
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, orYou 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:ShoutBoxString shoutOutRandomMessage()String shoutOutCannedMessage()Examples of canned messages stored in the canned messages data structure (you can store as many canned messages as you would like):âHello WorldââI am studyingââI am at workâExample of subjects stored in the subjects data structure:âIââYouâExample of objects stored in the objects data structure:âcourseââhomeworkâExample of verbs stored in the verbs data structure:âstudyingââeatingââsneezingâExample of adjectives stored in the adjectives data structure:âfunnyââpricklyââhardââawesomeâExample of adverbs stored in the adverbs data structure:âquicklyââeverywhereâThe following critical elements will be addressed in this submission:1. The method shoutOutCannedMessage() loops through the data structure that stores the canned messages first to display all canned messages and allows the user to select one canned message.2. The method shoutOutCannedMessage() will return the selected message string.3. Your shoutOutRandomMessage() method should use a random number generator that selects one word from each data structure to form a random message. The random number generated should not exceed the bounds of your data. In other words, if you only have 5 words in a data structure, the random number generated should not be an index that has no word stored.4. The method shoutOutRandomMessage() should return a randomly generated message string in accordance with specifications, in the following form:5. Subject – Verb – Adjective – Object – Adverb (for example, âYou read hard books quicklyâ).
Order | Check Discount
Tags:
Ace My Homework: Essay Help,
Assignment Help: USA's #1 Online Assignment Writing Service,
Do My Assignment for Me Online - Write Academic Papers,
Reliable Online Homework Help For You,
UK Homework Study Bay: Assignment Homework Help & Homework Answers,
Write My Assignments AU - Online Assignment Maker - Writing Services
Sample Essays, Assignments & Research Topics Ideas