public void BigCount(ParkingArea c) { if (this.count > c.count) { Console.WriteLine("{0} has more count than {1}", this.name, c.name); } else if (this.count < c.count) { Console.WriteLine("{0} has more count than {1}", c.name, this.name); } else { Console.WriteLine("{0} , {1} have the same count", this.name, c.name); } }
public void Move(ParkingArea c, int count) { if (this.type == c.type) { if ((c.count + count) > max_count) { c.count += (max_count - c.count); this.count -= (max_count - c.count); calculatePrice(); } else { c.count += count; this.count -= count; calculatePrice(); } } else { Console.WriteLine("Cannot move as different type"); } }