using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace __Fingers_the_Clown
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public interface IClown
        {
            string FunnyThingIHave { get; }
            void Honk();
        }

        public interface IScaryClown : IClown
        {
            string ScaryThingIHave { get; }
            void ScareLittleChildren();
        }

        public class FunnyFunny : IClown
        {
            public FunnyFunny(string funnyThingIHave)
            {
                this.funnyThingIHave = funnyThingIHave;
            }

            protected string funnyThingIHave;
            public string FunnyThingIHave
            {
                get { return "Kwa, kwa! Mam " + funnyThingIHave; }
            }

            public void Honk()
            {
                MessageBox.Show(this.FunnyThingIHave);
            }
        }

        public class ScaryScary : FunnyFunny, IScaryClown
        {
            public ScaryScary(string funnyThingIHave, int numberOfScaryThings)
                : base(funnyThingIHave)
            {
                this.numberOfScaryThings = numberOfScaryThings;
            }

            private int numberOfScaryThings;
            public string ScaryThingIHave
            {
                get { return "Mam " + numberOfScaryThings + " pająków"; }
            }

            public void ScareLittleChildren()
            {
                MessageBox.Show("Nie możesz mieć mojego " + base.funnyThingIHave);
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            ScaryScary fingersTheClown = new ScaryScary("duże buty", 14);
            FunnyFunny someFunnyClown = fingersTheClown;
            IScaryClown someOtherScaryclown = someFunnyClown as ScaryScary;
            someOtherScaryclown.Honk();
        }
    }
}
