10.05.2014 Views

programación i - Universidad ORT Uruguay

programación i - Universidad ORT Uruguay

programación i - Universidad ORT Uruguay

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Programación I 127<br />

Ilustración 20 Lleva y Trae<br />

Una posible implementación es:<br />

//Clase Paquete<br />

package llevaTrae;<br />

public class Paquete {<br />

// Variables de instancia<br />

private boolean llego;<br />

private int numero;<br />

private Cliente cliente;<br />

private Cliente destinatario;<br />

// Constructores<br />

public Paquete() {<br />

this.setNumero(0);<br />

this.setCliente(null);<br />

this.setDestinatario(null);<br />

this.setLlego (false);<br />

}<br />

public Paquete(int unNumero, Cliente unC, Cliente unD) {<br />

this.setNumero(unNumero);<br />

this.setCliente(unC);<br />

this.setDestinatario(unD);<br />

this.setLlego (false);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!