C# Course - Drawing Application Issue
Im working on the Drawing application where Im working with interfaces and my answer is the code contained below: using System; using System.Collections.Generic; namespace Code_Coach_Challenge { class Program { static void Main(string[] args) { Draw pencil = new Draw(); Draw brush = new Brush(); Draw spray = new Spray(); pencil.StartDraw(); brush.StartDraw(); spray.StartDraw(); } } /* Draw => "Using pencil" Brush => "Using brush" Spray => "Using spray" */ public interface IDraw { void StartDraw(); } class Draw : IDraw { public virtual void StartDraw() { Console.WriteLine("Using pencil"); } } //inherit this class from the class Draw class Brush : Draw { //implement the StartDraw() method public override void StartDraw(){ Console.WriteLine("Using brush"); } } //inherit this class from the class Draw class Spray : Draw { //implement the StartDraw() method public override void StartDraw() { Console.WriteLine("Using Spray"); } } } When I run the code It says the my output is: Using pencil Using brush Using Spray But that is wrong because the expected output is: Using pencil Using brush Using spray I cant seem to find what the issue is but I imagine that it has something to do with how my code was structured and not the actual results. Can anyone point out exactly what I'm doing wrong? Thanks in advance!