public class TiendaTickets
private string nombreTienda;
private string direccionTienda;
private int telefonoTienda;
private int[] numerosTickets;
private int[] preciosTickets;
private string[] tiposTickets;
public TiendaTickets(string nombreTienda, string direccionTienda, int telefonoTienda, int[] numerosTickets,
int[] preciosTickets, string[] tiposTickets)
this.nombreTienda = nombreTienda;
this.direccionTienda = direccionTienda;
this.telefonoTienda = telefonoTienda;
this.numerosTickets = numerosTickets;
this.preciosTickets = preciosTickets;
this.tiposTickets = tiposTickets;
public int obtenerPrecioTicket(int numero)
for(int i=0; i<this.numerosTickets.Length;i++)
if (this.numerosTickets[i]==numero)
return this.preciosTickets[i];
public void mostrarDatosTicket(int numero)
string tipo = "No encontrado";
for(int i=0; i<this.numerosTickets.Length;i++)
if (this.numerosTickets[i]==numero)
precio = this.preciosTickets[i];
tipo = this.tiposTickets[i];
Console.WriteLine("Numero: "+numero);
Console.WriteLine("Precio: $"+precio);
Console.WriteLine("Tipo: "+tipo);
public static void Main()
int[] numeros = new int[]{1,2,3,4};
int[] precios = new int[]{23000,42000,53000,64000};
string[] tipos = new string[]{"cancha","platea alta","platea media","platea baja"};
TiendaTickets tt1 = new TiendaTickets("TiendaOnline","Alameda #3456",993456789,numeros,precios,tipos);
Console.WriteLine("Precio $"+tt1.obtenerPrecioTicket(3));
tt1.mostrarDatosTicket(2);