⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 doctor.java

📁 A system to manage patients of an hospital (using Inheritance, Exceptions and Collections).
💻 JAVA
字号:
package hospital;

import java.util.*;

public class Doctor extends Person {
	private int id;
	private List patients = new LinkedList();
	
	public Doctor(String first, String last, int id) {
		super(first, last);
		this.id = id;
	}
	
	public Collection getPatients() {
		return patients;
	}
	
	public void addPatient(Patient p) {
		patients.add(p);
	}
	
	public String toString() {
		return id + " - " + super.toString();
	}	

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -