private static void ConstantVANcalculate() { VAN _van = new VAN(); Console.WriteLine("Inserta A"); _van.A = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Inserta constante Qn"); _van.Qconstante = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Resultado -> " + _van.CalculateVAN()); Console.ReadLine(); }
private static void VANcalculate() { VAN _van = new VAN(); Console.WriteLine("VAN = -A + VA"); Console.WriteLine(); Console.WriteLine("Inserta A"); _van.A = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Inserta VA"); _van.VA = Convert.ToDouble(Console.ReadLine()); Console.WriteLine("Resultado -> " + _van.CalculateVAN()); Console.ReadLine(); }
private static void Composite() { Console.WriteLine(); Console.WriteLine("3. COMPOSITE"); Fleet fleet = new Fleet(); Car car = new Car { ID = 1, Status = Status.InFleet, }; car.StatusChanged += VehicleStatusChanged; Car car2 = new Car { ID = 2, Status = Status.InFleet }; car2.StatusChanged += VehicleStatusChanged; VAN van = new VAN { ID = 3, Status = Status.InFleet }; van.StatusChanged += VehicleStatusChanged; Motorbike motorbike = new Motorbike { ID = 4, Status = Status.InFleet }; motorbike.StatusChanged += VehicleStatusChanged; fleet.AddVehicle(car); fleet.AddVehicle(car); fleet.AddVehicle(van); fleet.AddVehicle(motorbike); fleet.GoForClient(); fleet.StandBy(); }
public void Test16PorCiento() { IValorActualNeto van = new VAN(); van.Inversion = 2000000; for (int i = 0; i < 3; i++) { van.Pagos.Add(320000); } van.Pagos.Add(2320000); van.ResolverInterés(); double rent = van.Rentabilidad; Assert.AreEqual("0,16", rent.ToString()); }
public void Test11PorCiento() { IValorActualNeto van = new VAN(); van.Inversion = 2000; van.Pagos.Add(200); van.Pagos.Add(600); van.Pagos.Add(800); van.Pagos.Add(1200); van.ResolverInterés(); //van.Inflacion = 0.06; double rent = van.Rentabilidad; Assert.AreEqual(11.0, Math.Floor(rent * 100)); }