Doctor - = name public double return public void...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.lang.*; import java.util.*; import*; public abstract class Doctor implements Employable, Comparable, Cloneable, Serializable{ protected double salary; protected String name; protected double doctorRegistrationId; p public Doctor(){ this(0,"", 0); } public Doctor(double salary, String name, double doctorRegistrationId){ setSalary(salary); setName(name); setDoctorRegistrationId(doctorRegistrationId); } public double getSalary(){ return salary; } public void setSalary(double salary){ this.salary = salary; } public String getName(){ return name; } public void setName(String name){
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: = name; } public double getDoctorRegistrationId(){ return doctorRegistrationId; } public void setDoctorRegistrationId(double doctorRegistrationId){ this.doctorRegistrationId = doctorRegistrationId; } public Object clone() { try{ return super.clone(); } catch(CloneNotSupportedException ex){ return null; } } public int compareTo(Object o) { return (int)Math.signum(doctorRegistrationId-((Doctor)o).getDoctorRegistrationId()); } public String toString() { return "("+doctorRegistrationId+":"+name+")"; } }...
View Full Document

This note was uploaded on 03/25/2010 for the course CIS CIS3023 taught by Professor Seema during the Spring '10 term at Florida College.

Page1 / 2

Doctor - = name public double return public void...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online