static void Main(string[] args) { PlanetarySystem sys1 = new PlanetarySystem(); Spaceship laevJuku = new Spaceship("Juku", sys1); laevJuku.Travel(3); Spaceship laevKalle = new Spaceship("Kalle", sys1); laevKalle.Travel(3); laevKalle.Travel(4); laevKalle.Travel(3); laevKalle.Travel(2); AdvancedSpaceship laevPille = new AdvancedSpaceship("Pille", sys1); laevPille.Travel(5); Console.ReadLine(); }
public AdvancedSpaceship(string _spaceshipName, PlanetarySystem _psystem) : base(_spaceshipName, _psystem) { spaceshipName = _spaceshipName; psystem = _psystem; travelLength = 2; }
public Spaceship(string _spaceshipName, PlanetarySystem _psystem) { spaceshipName = _spaceshipName; psystem = _psystem; travelLength = 1; }