单例模式

所属分类:Java编程
开发工具:Java
文件大小:3KB
下载次数:2
上传日期:2019-12-08 17:39:10
上 传 者洛天依00
说明:  采用单例模式构造一个HFUT类,HFUT类含有校名、建校历史等属性,构造学生类、和教师类都提供getSchool方法,返回值为HFUT对象实例。在含有主方法的主类中,生成若干教师对象和学生对象,分别获得他们所属学校实例,采用“==”,“equal”函数,进行比较,判断是否有异同。
(A HFUT class is constructed in the single instance mode. The HFUT class contains school name, school building history and other attributes. The getschool method is provided for both the student class and the teacher class. The return value is the HFUT object instance.In the main class with the main method, several teacher objects and student objects are generated, and their school instances are obtained respectively. The functions "=", "equal" are used to compare and judge whether there are similarities and differences.)

文件列表:
单例模式\src\单例模式\单例模式.java (765, 2019-12-08)
单例模式 (0, 2019-12-07)
单例模式\.classpath (301, 2019-12-07)
单例模式\.project (388, 2019-12-07)
单例模式\.settings (0, 2019-12-07)
单例模式\.settings\org.eclipse.jdt.core.prefs (598, 2019-12-07)
单例模式\bin (0, 2019-12-08)
单例模式\bin\单例模式 (0, 2019-12-08)
单例模式\bin\单例模式\HFUT.class (655, 2019-12-08)
单例模式\bin\单例模式\单例模式.class (977, 2019-12-08)
单例模式\src (0, 2019-12-07)
单例模式\src\单例模式 (0, 2019-12-07)

近期下载者

相关文件


收藏者