首页/ 题库 / [问答题]何为抽象类?抽象类在程序中的作用?的答案

何为抽象类?抽象类在程序中的作用?

问答题
2021-12-31 23:13
查看答案

正确答案

抽象类指的是含有纯虚函数的类,该类不能建立对象,只能声明指针和引用,用于基础类的接口声明和运行时的多态󰀀另外,如果抽象类的某个派生类在向继承体系的根回溯过程中,并不是所有的纯虚函数都实现了,该类也是抽象类,同样不能建立对象。抽象类的主要作用是将有关的组织在一个继承层次结构中,由它来为它们提供一个公共的根,相关的子类是从这个根派生出来的。


试题解析

相关题目
boost的意思是:help or encourage to increase or improve
eloquent的意思是:fluent or persuasive in speaking or writing

A campus emergency ______ occur at any time of the day or night, weekend, or holiday, with little or no warning.

OR指令的作用是:(  )  
 OR指令的作用是:( )
OR指令的作用是:( )
OR指令的作用是:(  )
何为抽象类?抽象类在程序中的作用?
Mainly east 3 or 4 partly cloudy to overcast occasional rain()slowly south moderate or good.
()any case or suspected case of quarantinable disease,or any case of eruptive disease or any death be discovered,the local quarantine officer must be notified immediately.
Should any case or suspected case of quarantinable disease,or any case of eruptive disease or any death be discovered,the local Quarantine Officer must be()immediately.
Masters are()solely responsible for all damages or accidents of whatever kind resulting from the navigating or handling of their vessels by day or by night.
系统中雷达状态包括Unknown、Operational(or ON)、Failed(or OFF)、Detached。
The carrier is liable for loss of or damage to the goods or delay in delivery caused by fire,()the claimant proves that the fire arose from fault or neglect on the part of the carrier,his servants or agents.
Shutdown price(or point,or rule) 停业价格(或停业点、停业原则)
翻译:With Average or With Particular Average(WA or WPA)()
简述布尔算符(OR)的作用。
抽象方法必须在抽象类中,所以抽象类中的方法都必须是抽象方法。
抽象方法必须定义在抽象类中,所以抽象类中的方法都是抽象方法
一个类继承了抽象类,则抽象类中的抽象方法需要在其子类中覆写。
广告位招租WX:84302438

免费的网站请分享给朋友吧