Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

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

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M91607063
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Programming Language

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As