public Zabawka(int szybkosc, int wysokosc, int glebokosc, int wiek, Wartosc wartoscBazowa) { this.szybkosc = szybkosc; this.wysokosc = wysokosc; this.glebokosc = glebokosc; this.wiek = wiek; this.wartoscBazowa = wartoscBazowa; }
private static void test3(ToyRoom toyRoom) { Wartosc wartosc = new Wartosc(3, 5); FlyingToy samolot = new FlyingToy(2, 3, 5, wartosc); for(int i = 0; i < 10; i++) { toyRoom.dodajZabawke(samolot); } toyRoom.wyswietlPokoj(); toyRoom.changeSpeedForAll(50); Console.WriteLine("Koniec testu 3"); Console.WriteLine("---------------------------------"); }
private static void test2(ToyRoom toyRoom) { Wartosc wartosc = new Wartosc(3, 5); FlyingToy samolot = new FlyingToy(3, 5, 10, wartosc); for (int i = 0; i < 10; i++) { toyRoom.dodajZabawke(samolot); } toyRoom.wyswietlPokoj(); Console.WriteLine("Wartosc aktualna zabawki: " + samolot.WartoscAktualna); Console.WriteLine("Koniec testu 2"); Console.WriteLine("---------------------------------"); }
private static void test1(ToyRoom toyRoom) { Wartosc wartosc = new Wartosc(1, 4); FlyingToy samolot = new FlyingToy(3, 5, 10, wartosc); WaterToy zaglowka = new WaterToy(9, 1, wartosc); GroundToy mis = new GroundToy(50, wartosc); //samolot.showToyInfo(); toyRoom.dodajZabawke(samolot); toyRoom.dodajZabawke(zaglowka); //pokojZabawek.dodajZabawke(mis); toyRoom.wyswietlPokoj(); toyRoom.changeDepthForAll(666); toyRoom.wyswietlPokoj(); Console.WriteLine("Koniec testu 1"); Console.WriteLine("---------------------------------"); }
public Toy(int age, Wartosc wartoscBazowa) { this.age = age; this.wartoscBazowa = wartoscBazowa; }
public GroundToy(int age, Wartosc value) : base(age, value) { }
public FlyingToy(int speed, int height, int age, Wartosc value) : base(age, value) { this.speed = speed; this.height = height; }
public WaterToy(int depth, int age, Wartosc value) : base(age, value) { this.depth = depth; }