using System;
using System.Drawing;
namespace Love
{
class Flower
{
private Color color;
public Color Color
{
get { return this.color; }
set { this.color = value; }
}
}
class Rose : Flower
{
public Rose(Color color)
{
this.Color = color;
}
}
class Violet : Flower
{
public Violet(Color color)
{
this.Color = color;
}
}
interface ICharactaristic
{
bool IsSweet { get; set;}
}
class Sugar : ICharactaristic
{
bool isSweet;
#region ICharactaristic Members
public bool IsSweet
{
get { return this.isSweet; }
set { this.isSweet = value; }
}
#endregion
}
class You : ICharactaristic
{
bool isSweet;
#region ICharactaristic Members
public bool IsSweet
{
get { return this.isSweet; }
set { this.isSweet = value; }
}
#endregion
}
class Valentine
{
static void Main(string[] args)
{
Rose[] roses = new Rose[12];
Violet[] violets = new Violet[12];
for (int i = 0; i < 12; i++)
{
roses[i] = new Rose(Color.Red);
violets[i] = new Violet(Color.Blue);
}
Sugar sugar = new Sugar();
sugar.IsSweet = true;
You you = new You();
you.IsSweet = true;
}
}
}
Like this:
Like Loading...
Related