public static void Main()
Console.WriteLine("---------------------------------");
Console.Write("Enter the name of the rose: ");
string roseName = Console.ReadLine();
Console.Write("Enter the color of the rose: ");
string roseColor = Console.ReadLine();
Console.Write("Does the rose have thorns? (true/false): ");
bool hasThorns = bool.Parse(Console.ReadLine());
Rose rose1 = new Rose(roseName, roseColor, hasThorns);
Console.WriteLine("---------------------------------");
Console.WriteLine("---------------------------------");
Console.WriteLine("---------------------------------");
Console.Write("Enter the name of the sunflower: ");
string sunflowerName = Console.ReadLine();
Console.Write("Enter the color of the sunflower: ");
string sunflowerColor = Console.ReadLine();
Console.Write("Is the sunflower annual? (true/false): ");
bool isAnnual = bool.Parse(Console.ReadLine());
Sunflower sunflower1 = new Sunflower(sunflowerName, sunflowerColor, isAnnual);
Console.WriteLine("---------------------------------");
Console.WriteLine("---------------------------------");
sunflower1.DisplayInfo();
Console.WriteLine("---------------------------------");
public Flower(string name, string color)
public abstract void DisplayInfo();
public abstract void Bloom();
public Rose(string name, string color, bool hasThorns) : base(name, color)
this.hasThorns = hasThorns;
public override void DisplayInfo()
Console.WriteLine(color + " " + name);
Console.WriteLine("Type: Rose\nHas Thorns: " + hasThorns);
public override void Bloom()
Console.WriteLine("The rose is blooming with beautiful petals.");
public Sunflower(string name, string color, bool isAnnual) : base(name, color)
this.isAnnual = isAnnual;
public override void DisplayInfo()
Console.WriteLine(color + " " + name);
Console.WriteLine("Type: Sunflower\nIs Annual: " + isAnnual);
public override void Bloom()
Console.WriteLine("The sunflower is blooming with a bright yellow color.");