private static Object Criar() { int x = new Random().Next(1, 5); Object retorno = new Etiquetadora(); switch (x) { case 1: retorno = new Monitor(); break; case 2: retorno = new Impressora(); break; } return(retorno); }
private static Object Criar() { int x = new Random().Next(1, 5); Object retorno = new Etiquetadora(); switch (x) { case 1: retorno = new Monitor(); break; case 2: retorno = new Impressora(); break; } return retorno; }