static void Main(string[] args) { Box box = new Box("boxing day"); Product product = new Product("Luka", 69, 4); Product pro = new Product("Vukadin", 33, 3); box.Add(product); box.Add(pro); ShippingService price = new ShippingService(4); double w = 0; w += box.Weight; Console.WriteLine(box.Description()); Console.WriteLine(price.ToString() + price.Price(w) + " kuna"); }
static void Main(string[] args) { List <IShipable> itemList = new List <IShipable>(); itemList.Add(new Product("Product1", 19.99, 2)); itemList.Add(new Product("Product2", 10, 1.5)); Box box = new Box("Box1"); foreach (IShipable item in itemList) { box.Add(item); } //Testiranje prvog zadatka Console.WriteLine("Ukupna cijena: " + box.Price); Console.WriteLine("Ukupna kilaža: " + box.Weight); //Testiranje drugog zadatka ShippingService service = new ShippingService(3.99); Console.WriteLine("Cijena dostave: " + service.calculateDeliveryPrice(box)); }
static void Main(string[] args) { List <IShipable> ProductList = new List <IShipable>(); Box box = new Box("Box 1"); ProductList.Add(new Product("Product 1", 10, 5)); ProductList.Add(new Product("Product 2", 20, 8)); box.Add(new Box("Box num1")); foreach (IShipable item in ProductList) { box.Add(item); } ShippingService service = new ShippingService(1.7); double totalPrice = box.Price + service.ShippingPrice(box); Console.WriteLine("Total weight of package your package is " + box.Weight); Console.WriteLine("Total price of your package is" + totalPrice); }
static void Main(string[] args) { Product product1 = new Product("Product 1", 14, 7.77); Product product2 = new Product("Product 2", 7, 14.7); Box ListProducts = new Box("products"); ListProducts.Add(product1); ListProducts.Add(product2); ShippingService shippingService = new ShippingService(7); Console.WriteLine(shippingService.CalculatePrice(ListProducts)); DataConsolePrinter dataPrinter = new DataConsolePrinter(); VirtualProxyDataset virtualProxy = new VirtualProxyDataset("data.csv"); dataPrinter.printData(virtualProxy); User domagoj = User.GenerateUser("Domagoj"); User vocanec = User.GenerateUser("Vocanec"); ProtectionProxyDataset domagojProxy = new ProtectionProxyDataset(domagoj); ProtectionProxyDataset vocanecProxy = new ProtectionProxyDataset(vocanec); dataPrinter.printData(domagojProxy); dataPrinter.printData(vocanecProxy); LoggingProxy proxy = new LoggingProxy("data.csv"); dataPrinter.printData(proxy); }