Reference no: EM131049713
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:
ShoutBox
String 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").
Propose a cloud-based storage service
: For this assignment, imagine that you have been hired by ABC, Inc., a global company, to propose a cloud-based storage service appropriate for a globalized company to use to back up their machines.
|
How does the artist use the elements of art
: How does the artist use the elements of art (line, value, color, shape, texture)? How does the artist organize the elements of art to create artwork that you respond to (positive or negative!)?
|
Mutual fund that is expected to earn rate of return
: Suppose you invest $1000 into a mutual fund that is expected to earn a rate of return of 11%. How much money will you have in 10 years? If $8000 is invested in a certain business at the start of the year, the investor will receive $2400 at the end of..
|
The northern california power agency
: Apower consortium that distributes a mix of "green" and conventional electricity is implementing an XML-based settlements system that drives costs out of power distribution.
|
Canned messages data structure
: Examples of canned messages stored in the canned messages data structure (you can store as many canned messages as you would like):
|
Determine the concentration of product at t=2h assuming p0=0
: Determine the concentration of biomass at t=2h assuming quasi steady state. If alpha=0.2g/g Determine the concentration of product at t=2h assuming P0=0
|
Needed to fix something in account
: Assume an IT technician was working on your machine because they needed to fix something in your account, and you shared your credentials with them so they could do their work.
|
What is the present value of investment-interest rate
: Investment X yields a payment of $5000 at the end of year 1, a payment of $7000 at the end of year 2, a payment of $9000 at the end of year 3, and a payment of $11000 at the end of year 4. Investment Y yields a payment of $11000 at the end of year 1,..
|
How should dsi assess risk of adopting a cloud-based osds
: What model should DSI adopt for a cloud-based OSDS - how should DSI assess the risk of adopting a cloud-based OSDS?
|