配色: 字号:
开发工程师试题
2022-06-04 | 阅:  转:  |  分享 
  
绝密★启用前学院学年第二学期期末考试级专业()《开发工程师》试卷B题号一二三四五六七总分得分评卷人得分评卷人注意事
项:请根据自身能力尽量回答下面的题目,不要求全部回答。允许查阅资料,但是请结合自身经验独立完成,不允许任何形式的摘要和抄袭。请于5
个工作日内将答案寄=======================================================
===============第一部分:基本技能请如实填写以下表格。请根据自身情况如实填写。我们并不需要你什么都会,我们只是希望
通过这样的问卷调查对你的基本技能情况有所了解。数据库:ORACLEDB2INFORMIXSYBASEMYSQL<可在此填入除前4种
外的你熟悉的数据库名称>开发了解熟悉精通管理维护了解熟悉精通操作系统:了解熟悉精通LINUXAIXHP-UXSolaris<可在此
填入除上述以外的其他主机和操作系统>开发工程:了解熟悉精通WINCVS<可在此填入除wincvs以外的其他版本控制工具>UMLRU
PRationalRose<可在此填入除上述以外的其他设计工具>DELPHIVBJ2SE/J2EEC/C++forunix(不
含网络编程)C/C++forunix网络编程PROC/C++OCI/OTL<可在此填入除上述以外的其他开发工具>你最擅长的编译
型开发语言是什么?列出你开发中常用的函数库;列出你熟悉的开发语言(编译型)的一些常见的编译错误。列举你所了解的比较著名的环境变量,
并做简要说明(不限操作系统,越多越好)==============================================
========================第二部分:系统请在LINUX/UNIX环境下使用BSH或者CSH写出shells
cript,完成以下功能:定期检测系统状况,判断系统当前的负荷和磁盘的使用情况;当cpu负荷超过90%或者磁盘空间使用率超过9
0%时,向系统管理员告警。请简要列举unix进程间通信的几种模式,并根据自己经验进行比较。注意:请不要摘抄查阅的资料=======
===============================================================第三
部分:网络在不同的OS中,存在着两种不同的主机字节序:big-endian和little-endian。请描述着两种数据存放方式的
不同,并写一段小程序判断当前的OS使用的是哪种字节序;请描述主机字节序对网络字节序的影响。使用C++/JAVA编写一个最简单的网络
客户端类,可以从指定的网络端口读取数据请写出一段JS代码,实现以下功能:当前窗口打开页面后,在10秒后自动关闭,并在关闭时不进行确
认提示框的询问。=========================================================
=============第四部分:数据库在ORACLEsqlplus中执行以下SQL代码:selectfromemp
forupdate;insertintoempvalues(''test'',123);commit;select
fromemp;请分析执行过程中数据库锁的处理情况。请写出一段pl/sql代码,实现以下功能:对表A的更改操作进行实时
监控,并将操作的类型和更改前的历史数据记录在表B中假设数据库中准备创建有一张有如下数据的表emp:EMP_IDNAME
UNDER---------------------1CEO02CFO13
CTO14F0125F0226T0137T02
38T033i)请给出建表以及插入数据的SQL语句(指明你所用的数据库)ii)用C++或Ja
va语言实现数据库的连接,查询emp表的所有记录给出源代码、编译步骤、以及运行输出结果=====================
=================================================第五部分:开发语言使用C++/J
AVA编写一个函数,实现对一个字符串进行子字符串替换(String.replace)的功能。注意:请不要使用现成的字符串函数使用C
++/JAVA编写一个小程序,实现unixshell内嵌命令echo的功能。请用C++/Java写一个Singleton出来。下
面的C程序在编译后运行会出现什么问题?请给出解释#include/justadummy/#defi
nei_assert(something)intmain(intargc,charargv){inta,b
,c;intpa;a=3;b=15;pa=&a;/paisapointer
pointtothevariable''a''/c=b/pa;/so,cisthe
resultofbdividedbya/i_assert(c==5);printf("c=%d\n
",c);return0;}下面是一个new的重载函数:voidoperatornew(size_tsize,s
ize_tvarying)throw(std::bad_alloc){returnmalloc(size+vary
ing);}请问如何调用这个重载函数?==============================================
========================第六部分:项目设计假设有一个开发小组需要实行Bug的跟踪管理,现需要开发一套简易
的B/S结构的Bug跟踪管理系统,满足以下功能:.该系统有几类用户:经理开发人员测试人员.用户成功登陆之后才能
使用系统功能.用户可以退出系统.测试人员可以向系统提交bug,这个时候Bug属于"未指派"状态(注:系统自动记录提
交时间和提交人)。每条bug要包含如下的信息:Bug所属的程序程序版本号Bug的标题重现Bug的步骤期望看到的情况实际
看到的情况.对"未指派"的bug,经理有权指派某个开发人员负责Bug的处理(系统自动把bug状态改成"等待处理"状态,并
自动把对应的开发人员记录为处理人).开发人员看到有指派给自己的"等待处理"的bug之后,修改bug状态为"处理中",同时
开始bug的处理.开发人员处理完成之后向系统提交处理方案(系统自动把bug的状态改成"处理完成")."处理完成"的bu
g,由相应的bug提交人验证处理方案的正确性.若方案正确,提交人选"Bug已解决",系统会把相应的bug改成"已解决"状
态若方案不正确,提交人选"bug未解决",系统会把bug再次改成"未指派"状态.经理可以列出所有状态为"未指派"的bug
,把它们指派给开发人员处理.开发人员可以列出所有属于自已负责的"等待处理"的bug.测试人员可以列出所有自己提交的处
于"处理完成"的bug.系统的所有的用户都可以按照以下条件列出相应的bug提交时间,bug的状态,提交人,处理人
.系统对用户管理功能不做要求(密码修改/添加用户/删除用户等).所有的用户可以在系统数据初始化的时候生成该开发小组人员组
成:经理David开发人员JohnThomasTony测试人员JamesLucy要求:.简述你的实现方案
.选用你最熟悉的数据库,设计相关的数据表结构,给出建表以及初始化的SQL语句.给出你的实现代码(包括相关的源程序,页面
,图片等).给出你的系统的安装说明(指出系统平台要求,软件要求,用到的外部函数库,代码如何编译,如何部署,如何配置让
系统正确运行).用户使用说明(包括系统的url,各用户的密码).给出文件清单请猜测下面这段代码片断出自什么项目?给出项
目名,说明你的依据,并尽你所能阐述该项目。/UnescapesaURL.Returns0onsucces
s,non-zeroonerrorFailureisduetobad%escaper
eturnsHTTP_BAD_REQUESTdecoding%00->\0(thenullchara
cter)decoding%2f->/(aspecialcharacter)
returnsHTTP_NOT_FOUND/AP_DECLARE(int)ap_unescape_u
rl(charurl){registerintbadesc,badpath;charx,y;bades
c=0;badpath=0;/Initialscanforfirst''%''.Don''tbotherw
ritingvaluesbeforeseeinga''%''/y=strchr(url,''%'');if(
y==NULL){returnOK;}for(x=y;y;++x,++y){if(y!=''
%'')x=y;else{if(!apr_isxdigit((y+1))||!apr_isxdigit(
(y+2))){badesc=1;x=''%'';}else{x=x2c(y+1);y+=
2;if(IS_SLASH(x)||x==''\0'')badpath=1;}}}x=''\0'';
if(badesc)returnHTTP_BAD_REQUEST;elseif(badpath)returnHT
TP_NOT_FOUND;elsereturnOK;}==================================
====================================第七部分:英语翻译请任选一段进行全文/节选翻译Sectio
n1:Ifyou''veneverusedCVS(oranyversioncontrolsystem)befo
re,it''seasytogettrippedupbysomeofitsunderlyingassumpt
ions.WhatseemstocausethemostinitialconfusionaboutCVSis
thatitisusedfortwoapparentlyunrelatedpurposes:recordke
epingandcollaboration.Itturnsout,however,thatthesetwofu
nctionsarecloselyconnected.Recordkeepingbecamenecessarybe
causepeoplewantedtocompareaprogram''scurrentstatewithhow
itwasatsomepointinthepast.Forexample,inthenormalcou
rseofimplementinganewfeature,adevelopermaybringtheprog
ramintoathoroughlybrokenstate,whereitwillprobablyremain
untilthefeatureismostlyfinished.Unfortunately,thisisjus
tthetimewhensomeoneusuallycallstoreportabuginthelast
publiclyreleasedversion.Todebugtheproblem(whichmayalso
existinthecurrentversionofthesources),theprogramhasto
bebroughtbacktoauseablestate.Restoringthestateposesno
difficultyifthesourcecodehistoryiskeptunderCVS.Thedeve
lopercansimplysay,ineffect,"Givemetheprogramasitwast
hreeweeksago",orperhaps"Givemetheprogramasitwasatthe
timeofourlastpublicrelease".Ifyou''veneverhadthiskind
ofconvenientaccesstohistoricalsnapshotsbefore,youmaybes
urprisedathowquicklyyoucometodependonit.Personally,Ia
lwaysuserevisioncontrolonmycodingprojectsnow-it''ssaved
memanytimes.Tounderstandwhatthishastodowithfacilitati
ngcollaboration,we''llneedtotakeacloserlookatthemechani
smthatCVSprovidestohelpnumerouspeopleworkonthesamepro
ject.Butbeforewedothat,let''stakealookatamechanismtha
tCVSdoesn''tprovide(oratleast,doesn''tencourage):filelock
ing.Ifyou''veusedotherversioncontrolsystems,youmaybefam
iliarwiththelock-modify-unlockdevelopmentmodel,whereinade
veloperfirstobtainsexclusivewriteaccess(alock)tothefile
tobeedited,makesthechanges,andthenreleasesthelocktoa
llowotherdevelopersaccesstothefile.Ifsomeoneelsealready
hasalockonthefile,theyhaveto"release"itbeforeyoucan
lockitandstartmakingchanges(or,insomeimplementations,y
oumay"steal"theirlock,butthatisoftenanunpleasantsurpri
seforthemandnotgoodpractice!).Thissystemisworkableift
hedevelopersknoweachother,knowwho''splanningtodowhatat
anygiventime,andcancommunicatewitheachotherquicklyifso
meonecannotworkbecauseofaccesscontention.However,ifthed
evelopergroupbecomestoolargeortoospreadout,dealingwith
allthelockingissuesbeginstochipawayatcodingtime;itbec
omesaconstanthasslethatcandiscouragepeoplefromgettingre
alworkdone.CVStakesamoremellowapproach.Ratherthanrequi
ringthatdeveloperscoordinatewitheachothertoavoidconflict
s,CVSenablesdeveloperstoeditsimultaneously,assumesthebur
denofintegratingallthechanges,andkeepstrackofanyconfli
cts.Thisprocessusesthecopy-modify-mergemodel,whichworksa
sfollows:DeveloperArequestsaworkingcopy(adirectorytree
containingthefilesthatmakeuptheproject)fromCVS.Thisis
alsoknownas"checkingout"aworkingcopy,likecheckingabook
outofthelibrary.DeveloperAeditsfreelyinherworkingcopy
.Atthesametime,otherdevelopersmaybebusyintheirownwor
kingcopies.Becausetheseareallseparatecopies,thereisnoi
nterference-itisasthoughallofthedevelopershavetheirow
ncopyofthesamelibrarybook,andthey''reallatworkscribbli
ngcommentsinthemarginsorrewritingcertainpagesindependent
ly.DeveloperAfinishesherchangesandcommitsthemintoCVSal
ongwitha"logmessage",whichisacommentexplainingthenatur
eandpurposeofthechanges.Thisislikeinformingthelibrary
ofwhatchangesshemadetothebookandwhy.Thelibrarythenin
corporatesthesechangesintoa"master"copy,wheretheyarerec
ordedforalltime.Meanwhile,otherdeveloperscanhaveCVSquer
ythelibrarytoseeifthemastercopyhaschangedrecently.If
ithas,CVSautomaticallyupdatestheirworkingcopies.(Thispar
tismagicalandwonderful,andIhopeyouappreciateit.Imagine
howdifferenttheworldwouldbeifrealbooksworkedthisway!)
AsfarasCVSisconcerned,alldevelopersonaprojectareequa
l.Decidingwhentoupdateorwhentocommitislargelyamatter
ofpersonalpreferenceorprojectpolicy.Onecommonstrategyfor
codingprojectsistoalwaysupdatebeforecommencingworkona
majorchangeandtocommitonlywhenthechangesarecompleteand
testedsothatthemastercopyisalwaysina"runnable"state.S
ection2:MySQL,themostpopularOpenSourceSQLdatabase,ispro
videdbyMySQLAB.MySQLABisacommercialcompanythatbuildsi
tsbusinessprovidingservicesaroundtheMySQLdatabase.Seesec
tion1.1.2WhatIsMySQLAB.MySQLisadatabasemanagementsyste
m.Adatabaseisastructuredcollectionofdata.Itmaybeanyth
ingfromasimpleshoppinglisttoapicturegalleryorthevast
amountsofinformationinacorporatenetwork.Toadd,access,an
dprocessdatastoredinacomputerdatabase,youneedadatabase
managementsystemsuchasMySQL.Sincecomputersareverygooda
thandlinglargeamountsofdata,databasemanagementplaysacen
tralroleincomputing,asstand-aloneutilities,oraspartsof
otherapplications.MySQLisarelationaldatabasemanagementsys
tem.Arelationaldatabasestoresdatainseparatetablesrather
thanputtingallthedatainonebigstoreroom.Thisaddsspeeda
ndflexibility.Thetablesarelinkedbydefinedrelationsmaking
itpossibletocombinedatafromseveraltablesonrequest.The
SQLpartofMySQLstandsfor"StructuredQueryLanguage"-themo
stcommonstandardizedlanguageusedtoaccessdatabases.MySQLi
sOpenSourceSoftware.OpenSourcemeansthatitispossiblefor
anyonetouseandmodify.AnybodycandownloadMySQLfromtheIn
ternetanduseitwithoutpayinganything.Anybodysoinclinedca
nstudythesourcecodeandchangeittofittheirneeds.MySQLu
sestheGPL(GNUGeneralPublicLicense)http://www.gnu.org,tod
efinewhatyoumayandmaynotdowiththesoftwareindifferent
situations.IfyoufeeluncomfortablewiththeGPLorneedtoemb
edMySQLintoacommercialapplicationyoucanbuyacommercially
licensedversionfromus.WhyuseMySQL?MySQLisveryfast,rel
iable,andeasytouse.Ifthatiswhatyouarelookingfor,you
shouldgiveitatry.MySQLalsohasaverypracticalsetoffeat
uresdevelopedinveryclosecooperationwithourusers.Youcan
findaperformancecomparisonofMySQLtosomeotherdatabaseman
agersonourbenchmarkpage.Seesection5.1.4TheMySQLBenchmar
kSuite.MySQLwasoriginallydevelopedtohandleverylargedata
basesmuchfasterthanexistingsolutionsandhasbeensuccessful
lyusedinhighlydemandingproductionenvironmentsforseveraly
ears.Thoughunderconstantdevelopment,MySQLtodayoffersaric
handveryusefulsetoffunctions.Theconnectivity,speed,and
securitymakeMySQLhighlysuitedforaccessingdatabasesonthe
Internet.ThetechnicalfeaturesofMySQLForadvancedtechnical
information,seesection6MySQLLanguageReference.MySQLisac
lient/serversystemthatconsistsofamulti-threadedSQLserver
thatsupportsdifferentbackends,severaldifferentclientprogra
msandlibraries,administrativetools,andseveralprogrammingi
nterfaces.WealsoprovideMySQLasamulti-threadedlibrarywhic
hyoucanlinkintoyourapplicationtogetasmaller,faster,ea
siertomanageproduct.MySQLhasalotofcontributedsoftwarea
vailable.Itisverylikelythatyouwillfindthatyourfavorite
applicationorlanguagealreadysupportsMySQL.Theofficialway
topronounceMySQLis``MyEssQueEll''''(notMY-SEQUEL).Butwe
trytoavoidcorrectingpeoplewhosayMY-SEQUEL.Section3:Since
itspublicationin1982,RFC822hasdefinedthestandardformat
oftextualmailmessagesontheInternet.Itssuccesshasbeen
suchthattheRFC822formathasbeenadopted,whollyorpartiall
y,wellbeyondtheconfinesoftheInternetandtheInternetSMTP
transportdefinedbyRFC821.Astheformathasseenwideruse,
anumberoflimitationshaveprovenincreasinglyrestrictivefor
theusercommunity.RFC822wasintendedtospecifyaformatfor
textmessages.Assuch,non-textmessages,suchasmultimediam
essagesthatmightincludeaudioorimages,aresimplynotmentio
ned.Eveninthecaseoftext,however,RFC822isinadequatefo
rtheneedsofmailuserswhoselanguagesrequiretheuseofchar
actersetsricherthanUS-ASCII.SinceRFC822doesnotspecifym
echanismsformailcontainingaudio,video,Asianlanguagetext,
oreventextinmostEuropeanlanguages,additionalspecification
sareneeded.OneofthenotablelimitationsofRFC821/822based
mailsystemsisthefactthattheylimitthecontentsofelectro
nicmailmessagestorelativelyshortlines(e.g.1000characters
orless[RFC-821])of7bitUS-ASCII.Thisforcesuserstoconve
rtanynon-textualdatathattheymaywishtosendintoseven-bit
bytesrepresentableasprintableUS-ASCIIcharactersbeforeinvo
kingalocalmailUA(UserAgent,aprogramwithwhichhumanuser
ssendandreceivemail).Examplesofsuchencodingscurrentlyus
edintheInternetincludepurehexadecimal,uuencode,the3-in-4
base64schemespecifiedinRFC1421,theAndrewToolkitReprese
ntation[ATK],andmanyothers.ThelimitationsofRFC822mailb
ecomeevenmoreapparentasgatewaysaredesignedtoallowforth
eexchangeofmailmessagesbetweenRFC822hostsandX.400hosts
.X.400[X400]specifiesmechanismsfortheinclusionofnon-tex
tualmaterialwithinelectronicmailmessages.Thecurrentstanda
rdsforthemappingofX.400messagestoRFC822messagesspecify
eitherthatX.400non-textualmaterialmustbeconvertedto(not
encodedin)IA5Textformat,orthattheymustbediscarded,noti
fyingtheRFC822userthatdiscardinghasoccurred.Thisisclea
rlyundesirable,asinformationthatausermaywishtoreceivei
slost.Eventhoughauseragentmaynothavethecapabilityof
dealingwiththenon-textualmaterial,theusermighthavesomem
echanismexternaltotheUAthatcanextractusefulinformationf
romthematerial.Moreover,itdoesnotallowforthefactthat
themessagemayeventuallybegatewayedbackintoanX.400messag
ehandlingsystem(i.e.,theX.400messageis"tunneled"through
Internetmail),wherethenon-textualinformationwoulddefinitel
ybecomeusefulagain.Thisdocumentdescribesseveralmechanisms
thatcombinetosolvemostoftheseproblemswithoutintroducing
anyseriousincompatibilitieswiththeexistingworldofRFC822
mail.Inparticular,itdescribes:(1)AMIME-Versionheader
field,whichusesaversionnumbertodeclareamessagetobecon
formantwithMIMEandallowsmailprocessingagentstodistinguis
hbetweensuchmessagesandthosegeneratedbyolderornon-confo
rmantsoftware,whicharepresumedtolacksuchafield.(2)A
Content-Typeheaderfield,generalizedfromRFC1049,whichcanb
eusedtospecifythemediatypeandsubtypeofdatainthebody
ofamessageandtofullyspecifythenativerepresentation(cano
nicalform)ofsuchdata.(3)AContent-Transfer-Encodingheade
rfield,whichcanbeusedtospecifyboththeencodingtransform
ationthatwasappliedtothebodyandthedomainoftheresult.
Encodingtransformationsotherthantheidentitytransformationa
reusuallyappliedtodatainordertoallowittopassthroughm
ailtransportmechanismswhichmayhavedataorcharactersetlim
itations.(4)Twoadditionalheaderfieldsthatcanbeusedto
furtherdescribethedatainabody,theContent-IDandContent-D
escriptionheaderfields.Alloftheheaderfieldsdefinedinthi
sdocumentaresubjecttothegeneralsyntacticrulesforheader
fieldsspecifiedinRFC822.Inparticular,alloftheseheader
fieldsexceptforContent-DispositioncanincludeRFC822comments,whichhavenosemanticcontentandshouldbeignoredduringMIMEprocessing.Finally,tospecifyandpromoteinteroperability,RFC2049providesabasicapplicabilitystatementforasubsetoftheabovemechanismsthatdefinesaminimallevelof"conformance"withthisdocument.HISTORICALNOTE:Severalofthemechanismsdescribedinthissetofdocumentsmayseemsomewhatstrangeorevenbaroqueatfirstreading.ItisimportanttonotethatcompatibilitywithexistingstandardsANDrobustnessacrossexistingpracticeweretwoofthehighestprioritiesoftheworkinggroupthatdevelopedthissetofdocuments.Inparticular,compatibilitywasalwaysfavoredoverelegance.Pleaserefertothecurrenteditionofthe"InternetOfficialProtocolStandards"forthestandardizationstateandstatusofthisprotocol.RFC822andSTD3,RFC1123alsoprovideessentialbackgroundforMIMEsincenoconformingimplementationofMIMEcanviolatethem.Inaddition,severalotherinformationalRFCdocumentswillbeofinteresttotheMIMEimplementor,inparticularRFC1344,RFC1345,andRFC1524.学生填写内容专业班级姓名学号密封区教师填写内容考试类型考试【】考查【】命题人审批《》试卷A第1页共6页《》试卷A第2页共2页
献花(0)
+1
(本文系太好学原创)