Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Paziente implements Persona {
- private String nome;
- private String cognome;
- private String cf;
- private Medico medico;
- public Paziente(String nome, String cognome, String cf) {
- // TODO Auto-generated constructor stub
- this.nome=nome;
- this.cognome=cognome;
- this.cf=cf;
- }
- public String getNome() {
- // TODO Auto-generated method stub
- return nome;
- }
- public String getCognome() {
- // TODO Auto-generated method stub
- return cognome;
- }
- void setMedico(Medico medicoCurante){
- medico = medicoCurante;
- }
- public Medico getMedico()
- {
- return medico;
- }
- public int compareTo(Persona arg0) {
- int cfrCognomi =this.cognome.compareTo(altra.getCognome());
- if(cfrCognomi !=0) return cfrCognomi;
- return this.cognome.compareTo(altra.getNome());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment