面向对象程序设计期末试题a卷

面向对象程序设计期末试题a卷

ID:35504670

大小:73.54 KB

页数:8页

时间:2019-03-25

面向对象程序设计期末试题a卷_第1页
面向对象程序设计期末试题a卷_第2页
面向对象程序设计期末试题a卷_第3页
面向对象程序设计期末试题a卷_第4页
面向对象程序设计期末试题a卷_第5页
资源描述:

《面向对象程序设计期末试题a卷》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、1.1.2.青岛大学课程考试试卷2004〜2005学年春季学期考试吋间:2005年7月课程名称面向对象程序设计方法A卷/B卷口题号•・•-三卩L

2、五六成绩复核得分阅卷得分阅卷人I.True/False(20%)1.InOOP,asubclassusuallyis”smaller"(containingfewerfunctionsandlessdata)thanitssuperclass.()2.Ifyoudonotusethereservedwordspublicandprivate,allmembe

3、rsofaC++classareprivateandallmembersofastructarepublic.()3.Ifyouhavewrittenyourownheaderfilenamedmytypes.h,thenthepreprocessordirective#includeisthecorrectwaytoinsertthecontentsoftheheaderfileintoaprogram.()4.Avariableoftypestringcanbeassigne

4、dtoavariableoftypechar.()5.Thegetlinefunctionisamemberfunctionofthestringclass.()6.Usingareferenceparameter(passingbyreference),thecalledfunctioncanobtaintheinitialvalueofanargumentaswellaschangethevalueoftheargument.()7.Variablesdeclaredatthebeginningo

5、fablockareaccessibletoallremainingstatementsinthatblock,includingthoseinnestedblocks(assumingthenestedblocksdon^tdeclarelocalvariablewiththesamenames).()8.InC++,inheritanceallowsaderivedclasstodirectlyaccessallofthefunctionsanddataofitsbaseclass.()9.The

6、specificationofanabstractdatatype(ADT)shouldnotmentionimplementationdetails.()10.InC++,ifclassXisabaseclassofclassY,thenYcannotdirectlyaccessX'sprivatedata.()得分阅卷人ILMultipleChoice(20%)Whichoneofthefollowingisnotoneofthethreemajorphasesinthelifecycleofac

7、omputerprogram?()a.theproblem-solvingphaseb.themanagementphasec.theimplementationphased.themaintenancephase2.Whichofthefollowingtranslatesaprogramwritteninahigh-levellanguageintomachinecode?()a.amouseb.acompilerc.anoperatingsystemd・aneditor3.Giventhetwo

8、linesofinputdataABCDEwhatvalueisreadintoch3bythefollowingcode?(Allvariablesareoftypechar.)cin»ch1»ch2»ch3;()a.Bb.Wc.'Cd・De.noneoftheabove4・Whichtypeofloopwouldbemostappropriateforsolvingtheproblem^Calculatethesumofalltheoddintegersinadatafileofunknownle

9、ngth”?()a.acount-controlledloopb.aflag-controlledloopc.asentinel-controlledloopd.anEOF-controlledloope.eitherborcabove5.Passingbyreferenceisusedifaparameter^dataflowis()a.one-way,intothefunction.b.one-way,outofthefunction.c.two-w

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。