I have a base class called Vehiculos
and apart I have another class called Alquiler
. It turns out when you make the rent I have to show you what the total rental price would be, this is done by multiplying the daily cost of the vehicle (which is in the class Vehiculos
) by the number of days (it is in the class Alquiler
).
To calculate would dia2 - dia1 * daily cost
How can I spend the daily cost for the rental class?
public double Costodiario
{
get { return costodiario; }
set
{
if (value < 25)
throw new Exception("El costo diario minimo es de 25 dolares");
else
costodiario = value;
}
}
public int Dia1
{
get { return dia1; }
set { dia1 = value; }
}
public int Mes1
{
get { return mes1; }
set { mes1 = value; }
}
public int Anio1
{
get { return anio1; }
set { anio1 = value; }
}
public int Dia2
{
get { return dia2; }
set { dia2 = value; }
}
public int Mes2
{
get { return mes2; }
set { mes2 = value; }
}
public int Anio2
{
get { return anio2; }
set { anio2 = value; }
}