-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpago.cs
More file actions
45 lines (39 loc) · 1.1 KB
/
pago.cs
File metadata and controls
45 lines (39 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AppCarpooling
{
//Clase Pago
internal class Pago
{
//Atributos
public short tipoPago;
public string banco;
//Constructor
public Pago(short tipoPago)
{
this.tipoPago = tipoPago;
realizarPago(tipoPago);
}
//Método para seleccionar el pago
public void realizarPago(short tipoPago)
{
switch (tipoPago)
{
case 1:
Console.WriteLine("La opción elegida es Pago en efectivo");
break;
case 2:
Console.WriteLine("La opción elegida es Pago por transferencia");
banco = Aplicacion.Preguntas("Escribe el banco con el que deseas pagar:", 1);
break;
default:
Console.WriteLine("La opción es incorrecta");
break;
}
}
}
}