programación i - Universidad ORT Uruguay
programación i - Universidad ORT Uruguay
programación i - Universidad ORT Uruguay
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
128 Programación I<br />
}<br />
// acceso y modificacion<br />
public Cliente getCliente() {<br />
return cliente;<br />
}<br />
public Cliente getDestinatario() {<br />
return destinatario;<br />
}<br />
public boolean getLlego() {<br />
return llego;<br />
}<br />
public int getNumero() {<br />
return numero;<br />
}<br />
public void seRecibio() {<br />
llego = true;<br />
}<br />
public void setCliente(Cliente unCliente) {<br />
cliente = unCliente;<br />
}<br />
public void setDestinatario(Cliente unDestinatario) {<br />
destinatario = unDestinatario;<br />
}<br />
public void setNumero(int unNumero) {<br />
numero = unNumero;<br />
}<br />
// Redefinición de métods<br />
@Override<br />
public boolean equals(Object parm1) {<br />
return this.getNumero() == ((Paquete) parm1).getNumero();<br />
}<br />
}<br />
@Override<br />
public String toString() {<br />
String retorno = "Número de paquete: " + this.getNumero()<br />
+ "\nCliente " + this.getCliente() + "\nDestinatario "<br />
+ this.getDestinatario();<br />
if (this.getLlego()) {<br />
retorno = retorno + "\nFue entregado";<br />
} else {<br />
retorno = retorno + "\nNo fue entregado";<br />
}<br />
return retorno;<br />
}