No lo puedo resolver. Quiero saber que esta mal | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

No lo puedo resolver. Quiero saber que esta mal

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"); } } //hereda esta clase de la clase Draw clase Brush: Draw { //implementa el método StartDraw() public override void StartDraw(){ Console.WriteLine ("Using brush"); } } //hereda esta clase de la clase Draw clase Spray: Draw { //implementa el método StartDraw() public override void StartDraw(){ Console.WriteLine ("Using spray"); } } }

5th Dec 2021, 3:10 PM
Fernando Benitez
1 Answer
0
Spelling mistakes in line:43, 53 in class,.. You wrote it as clase
5th Dec 2021, 3:41 PM
Jayakrishna 🇮🇳