首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
欲使类A的所有使用者都使用A的同一个实例,应(47)。
欲使类A的所有使用者都使用A的同一个实例,应(47)。
admin
2014-10-13
32
问题
欲使类A的所有使用者都使用A的同一个实例,应(47)。
选项
A、将A标识为final
B、将A标识为abstract
C、将单例(Singleton)模式应用于A
D、将备忘(Memoto)模式应用于A
答案
C
解析
单例(Singleton)模式用于确保某个类只有一个实例,且自行实例化,并向整个系统提供该实例。Singleton模式为一个面向对象的应用程序提供了对象唯一的访问点,不管它实现何种功能,整个应用程序都会共享一个实例对象。
转载请注明原文地址:https://kaotiyun.com/show/tGRZ777K
本试题收录于:
软件设计师上午基础知识考试题库软考中级分类
0
软件设计师上午基础知识考试
软考中级
相关试题推荐
在Windows系统中,“持久路由”就是(1)。要添加一条到达目标10.40.0.0/16的持久路由,下一跃点地址为10.27.0.1,则在DOS窗口中输入命令(2)。(2009年上半年试题)(1)
两个部件的可靠度R均为0.8,由这两个部件串联构成的系统的可靠度为(1);由这两个部件并联构成的系统的可靠度为(2)。(2)
关于软件著作权产生的时间,表述正确的是()。
CDMAforcellularsystemscanbedescribedasfollows.AswithFDMA,eachcellisallocatedafrequency(71),whichissplitinto
CDMAforcellularsystemscanbedescribedasfollows.AswithFDMA,eachcellisallocatedafrequency(71),whichissplitinto
阅读下列说明,回答问题1~问题4。【说明】某超市的销售业务由一个销售业务管理系统进行管理,该系统每完成一次交易都需要提供顾客发票,其格式见表6所示。对于这样一个销售业务管理系统,分别给出了以下两种关系数据库的设计
Digital computer is controlled by internally stored programs and(66)of using common storage for all or part of a program and al
Comparisons were drawn between the development of television in the 20th century and the diffusion of printing in the 15th and 1
Ravi,likemanyproject(71),hadstudiedthewaterfallmodelofsoftwaredevelopmentastheprimarysoftwarelife-cycle(72).He
The()isthebrainofthepersonalcomputer.
随机试题
CT扫描时某断层中部可见五角形的鞍上池,由大脑纵裂池、外侧窝池、交叉池和桥池组成。视交叉两侧为
关于狂犬病病毒,正确的描述是
工程项目建设有众多的参与方,各方为实现特定目标而进行不同类型的项目管理,但核心是()方的项目管理。
2010年12月1日,甲公司购入管理部门使用的设备一台,原价为3000万元,预计使用年限为10年,预计净残值为200万元,采用直线法计提折旧,与税法规定一致。2015年1月1日考虑到技术进步因素,将原预计的使用年限改为8年,净残值改为120万元,该公司的所
十八届四中全会指出,党的领导是全面推进依法治国、加快建设社会主义法治国家最根本的保证。()
下列关于紧急避险的说法错误的是()
请根据下图所示的网络结构回答下列问题。如果需要监听路由器RE和RG设备之间的所有流量,可以在该链路中串入一种设备。请写出这种设备的名称。
AmItounderstandthathisnewpost______noresponsibilitywithitatall?
Joespokeofsuperfluousand(i)______matterswithexactlythesamedegreeofintensity,asthoughforhimseriousissuesmatte
Concernsafewyearsagothatstudentswouldbeforcedtousestimulantsinthefightforclassrankandhonorsthusseemtobe
最新回复
(
0
)