Reference no: EM13936179
1 Overview
Dr. Bradbury's Circus of Total Evil travels the galaxy terrorizing children both good and bad. In an effort to save money, Dr. Bradbury has purchased his Robotic Clown Troupe from the Acme Company of Walla Walla, Washington on Planet Earth. The Acme Company's robotic clowns can be funny, scary, or both at the same time. You have been contracted to write a collection of classes that simulate Acme's evil clowns.
2 Background
The initial code from Acme has a clown class named TallGuyClown
public class TallGuyClown
{
public string name;
publicint height;
public void TalkAboutYourself()
{
MessageBox.Show("my name is " + Name
+ " I'm " + height + "feet tall");
}
}
3 The IClown interface
Write an interface IClown that defines one method Honk(). Modify the TallGuyClown class to implement that interface so that calling Honk() will display a MessageBox (as above) that says "Honk my horn!". Add a property FunnyThingIHave to the interface and modify TallGuyClown to implment that property.
4 Adding a new class that implements IClown
Define a new class FunnyClown that uses a private string variable to store the "funny" thing this clown says to the children in the audience. This class should have a constructor that has a single string and use the public FunnyThingIHave property to set the private instance variable. This class needs to define the Honk() method to say "Honk, Honk! I have a" followed by its funny thing.
5 Extending the clown interface
Define a second interface IScaryClown that extends the IClown interface. The new interface needs to define a second string property named myScaryThings and a void method called ScareTheChildrens().
6 Using the IScaryClown interface
Define a new class ScaryClown that uses a private variable to store an integer that was passed to the class in the class constructor. The myScaryThngs getter method needs to return a string consisting of this number followed by "spiders". The ScareTheChilrens() method should pop up a mesasge that says "Boo, Gotcha!". Don't forget to implement the Honk() method.
7 Test framework
Write a test harness for these classes that stores a list of IClown objects. Insert a random collection of TallGuyClown, FunnyClown, and ScaryClown objects into this list. Then traverse the list calling the Honk() method in each object.
Attachment:- Program.zip
Design, implement and evaluate a mobile/web
: Interpret the broad range of business activities that are supported or enabled by Mobile/Web technologies and be able to advise organisations on the appropriate use of Mobile and Web Technologies.
|
Choose a planning approach and describe an ideal situation
: Part of being effective in participation in program planning is being comfortable with using different approaches in different situations. Choose a planning approach and describe an ideal situation and a least ideal situation for its use. Strateg..
|
Type of organizational culture-market oriented
: 1) what type of organizational culture? Market oriented? 2) what type of org structure, organizational chart?
|
What would happen to the profit of this bank
: Suppose the reserve-requirement is 25% and this bank decides to comply by a marketing campaign. If the campaign increases checking deposits, how much additional funds do they need to raise to satisfy the requirement?
|
Write a test harness for these classes
: Write an interface IClown that defines one method Honk(). Modify the TallGuyClown class to implement that interface so that calling Honk() will display a MessageBox (as above) that says "Honk my horn!". Add a property FunnyThingIHave to the interf..
|
Relationship between obesity and lack of exercise
: Clearly there is a relationship between obesity and lack of exercise and poor diet. In addition, most philosophers throughout the history of the world have agreed that happiness will, at some point, require meaningful relationships with other hum..
|
Determine a set of heuristic usability principles
: Note: You have to describe about Heuristic usability principles in this part using your own words and in this part you can use the reference. I have upload a PDF file for your information which will be mostly enough to for this part or if you know..
|
What are the major effects of urban bias
: Generally speaking, higher income countries tend to have less income inequality than low income countries, however this does not always hold true. What could cause a low income country to have low income inequality?
|
Does the doctrine of impossibility apply
: Who wins? Does the doctrine of impossibility apply? Should the court imply a condition of "good health" into the contract for the ski lessons?
|