Create shoutbox class for your virtual world.

Assignment Help C/C++ Programming
Reference no: EM13939809

You will create the ShoutBox class for your Virtual World. Your ShoutBox class will have two methods:

Method shoutOutCannedMessage() will return type String. The shoutOutCannedMessage will use an Array or an ArrayList to store 10 messages of type String. For those of you who 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. You can initialize your Array or ArrayList with the messages or have the user enter the messages. The choice is yours. 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.

The shoutOutRandomMessage() method will return type String.

The shoutOutRandomMessage() will use several Arrays or an ArrayList to store words. You will have one data structure that holds a list of words that are subjects, another data structure that holds a list of words that are objects, another that holds a list of verbs, another that holds a list of adverbs, and another that holds a list of adjectives. You can initialize your data structures with words or have the user enter the words. The choice is yours.

The shoutOutRandomMessage() method will use a random number generator that selects one word from each data structure to form a random message. The shoutOutRandomMessage() method will return the random message as a String data type. Random messages will be of the form: Subject - Verb - Adjective - Object - Adverb. Document your shoutOutRandomMessage() method to explain the code.

Reference no: EM13939809

Questions Cloud

Was the british pound selling at a discount or premium : What was the 90-day forward premium (or discount)?  Was the British pound selling at a discount or premium in the forward market?
Calculate a firms cost of equity : Consider one of the two equations that can be used to calculate a firm's cost of equity: rE=Div1/P0+g. If the expected growth rate of American Airlines common stock dividends increases and if the price of AAL's stock also increases, what happens to A..
Transaction costs and taxes : The price of ABC stock is currently $42 per share, but in six months you expect it to rise to $50. ABC does not pay a dividend. You buy a six-month call on ABC, with a strike price of $45. The option cost $200. What holding period return do you expec..
What are the dividends per share-earnings per share : Billy’s Exterminators, Inc., has sales of $752,000, costs of $312,000, depreciation expense of $64,000, interest expense of $42,000, a tax rate of 35 percent, and paid out $57,600 in cash dividends. The firm has 120,000 shares of common stock outstan..
Create shoutbox class for your virtual world. : The shoutOutRandomMessage() method will use a random number generator that selects one word from each data structure to form a random message
Motivation for adult online learning : What motivate adults to enroll in online education - This article is about how online course designers/programmers have change programs to allow students have more settings to allow the student to have more flexibility in how they learn.
Compute aztec departmental overhead rate : Aztec Industries produces bread which goes through two operations, mixing and baking, before it is ready to be packaged. Next year's expected costs and activities are shown below.
Normally pays an annual dividend : MMK Cos. normally pays an annual dividend. The last such dividend paid was $2.15, all future dividends are expected to grow at a rate of 8 percent per year, and the firm faces a required rate of return on equity of 14 percent. If the firm just announ..
Problem regarding the series of multiple alleles : Plumage in ducks is determined to some extent by a series of multiple alleles named restricted (MR = white on the wing fronts), mallard (M = wild type), and dusky (md = darker plumage). MR is dominant to M, which is dominant to md

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Determining the corresponding node labels

Use binary reflected Gray code (RGC) to determine how a 16-node linear array can be mapped to a 4-D hypercube. You must derive the 4-bit Gray codes and the corresponding node labels of a 4-D hypercube. Draw the mapping of the 16-node linear array ..

  Sort an array of elements using the quick sort algorithm

Sort an array of 10,000 elements using the quick sort algorithm as follows: sort the array using pivot as the middle element of the array

  Create a class called point3d

Create a class called Point3D to represent 3D point in space, a class called Sphere and a class called Cylinder. The sphere is characterized by its center point and the radius while the Cylinder can be characterized by its center point, radius and he..

  Design a phonecall class that holds a phone number

Design a PhoneCall class that holds a phone number to which a call is placed, the length of the call in minutes, and the rate charged per minute. Overload extraction and insertion operators for the class.

  Goto statements to explicitly

Rewrite the following program fragment using goto statements to explicitly show the flow control through the loop.

  What will double-clicking a sheet tab do for you

Preformatted worksheets used for special purposes such as creating sales Invoices are called?

  What would be the coding for this process

If I have a panorama, and want to stitch the 3 photos together perfectly (just lining them up along the edges to create one long photo, no matching needed), what would be the coding for this process?

  Explain the rand() in detail with example

The student should be able to test himself in addition, substraction, multiplication, divission giving integer (we use possitive numbers)

  How do you initiate an array with a proper amount of values

How do you initiate an array with a proper amount of values?

  Define and implement structures in c

Define and implement structures in C and summarize the operations of a linked list - Generate a random number between 1 - 5 and 3 - 8 for express and normal lanes, respectively. This represents the arrival time of the first customer into each lane.

  Calculate the area of the circle

Write an application that prompts the user for the radius of a circle and uses a method called circleArea to calculate the area of the circle.

  Write a short c++ function

Write a short C++ function, isMultiple, that takes two positive long values, n and m, and returns true if and only if n is a multiple of m, that is, n = mi for some integer i.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd