public Viagem(int id, Garagem origem, Garagem destino, Veiculo veiculo) { this.id = id; this.origem = origem; this.destino = destino; this.veiculo = veiculo; }
public override bool Equals(object obj) { if (obj.GetType() != this.GetType()) { return(false); } Garagem garagem = (Garagem)obj; return(this.id == garagem.id); }