C语言C++面向对象本科毕业设计外文文献翻译

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

(二〇一四年六月本科毕业设计外文文献翻译题目:Object-OrientationandC++学生姓名:xxx学院:信息工程学院系别:软件系专业:软件工程班级:软件10-2班指导教师:xxx讲师学校代码:10128学号:xxxxxxxxxxxx内蒙古工业大学本科毕业设计外文文献2Object-OrientationandC++C++isjustoneofmanyprogramminglanguagesinusetoday.Whyaretheresomanylanguages?Whydonewonesappeareveryfewyears?Programminglanguageshaveevolvedtohelpprogrammerseasethetransitionfromdesigntoimplementation.Thefirstprogramminglanguageswereverydependentontheunderlyingmachinearchitecture.Writingprogramsatthislevelofdetailisverycumbersome.Justashardwareengineerslearnedhowtobuildcomputersystemsoutofothercomponents,languagedesignersalsorealizedthatprogramscouldbewrittenatamuchhigherlevel,therebyshieldingtheprogrammerfromthedetailsoftheunderlyingmachine.Whyaretheresuchalargenumberofhigh-levelprogramminglanguages?Therearelanguagesforaccessinglargeinventorydatabases,formattingfinancialreports,controllingrobotsonthefactoryfloor,processinglists,controllingsatellitesinrealtime,simulatinganuclearreactor,predictingchangingatmosphericconditions,playingchess,anddrawingcircuitboards.Eachoftheseproblemsrequiresdifferentsetsofdatastructuresandalgorithms.Programminglanguagesaretoolstohelpussolveproblems.However,thereisnotoneprogramminglanguagethatisbestforeverytypeofproblem.Newprogramminglanguagesareoftendevelopedtoprovidebettertoolsforsolvingaparticularclassofproblems.Otherlanguagesareintendedtobeusefulforavarietyofproblemdomainsandaremoregeneralpurpose.Eachprogramminglanguageimpartsaparticularprogrammingstyleordesignphilosophyonitsprogrammers.Withthemultitudeofprogramminglanguagesavailabletoday,anumberofsuchdesignphilosophieshaveemerged.Thesedesignphilosophies,calledprogrammingparadigms,helpustothinkaboutproblemsandformulatesolutions.1.SoftwareDesignthroughParadigmsWhendesigningsmallcomputerprogramsorlargesoftwaresystems,weoftenhaveamentalmodeloftheproblemwearetryingtosolve.Howdowedeviseamentalmodelofasoftwaresystem?Programmingparadigmsoffermanydifferentwaysofdesigningandthinkingaboutsoftwaresystems.Aparadigmcanbethoughtof内蒙古工业大学本科毕业设计外文文献3asamentalmodelorasaframeworkfordesigninganddescribingasoftwaresystem'sstructure.Themodelhelpsusthinkaboutandformulatesolutions.Wecanusethementalmodelofaparadigmindependentlyfromtheprogramminglanguagechosenforimplementation.However,whenthechosenlanguageprovidesconstructsandmechanismsthataresimilartothosethatarefoundintheparadigm,theimplementationwillbemorestraightforward.Usually,thereareseverallanguagesthatbelongtoaparadigm.Forthisreason,aprogrammingparadigmisalsoconsideredaclassoflanguages.Alanguagedoesnothavetofitintojustoneparadigm.Moreoften,languagesprovidefeaturesorcharacteristicsfromseveralparadigms.Hybridlanguages,suchasC++,combinecharacteristicsfromtwoormoreparadigms.C++includescharacteristicsfromtheimperativeandproceduralparadigms--justlikeitspredecessorlanguage,C--andtheobject-orientedparadigm.THEIMPERATIVEPARADIGM.Theimperativeparadigmischaracterizedbyanabstractmodelofacomputerwithalargememorystore.ThisistheclassicvonNeumannmodelofcomputerarchitecture.Computations,whichconsistofasequenceofcommands,arestoredasencodingwithinthestore.Commandsenablethemachinetofindsolutionsusingassignmenttomodifythestore,variablestoreadthestore,arithmeticandlogictoevaluateexpressions,andconditionalbranchingtocontroltheflowofexecution.THEPROCEDURALPARADIGM.Theproceduralparadigmincludestheimperativeparadigm,butextendsitwithanabstractionmechanismforgeneralizingcommandsandexpressionsintoprocedures.Parameters,whichareessentiallyaliasesforaportionofthestore,werealsointroducedbythisparadigm.Otherfeaturesincludeiteration,recursion,andselection.Mostmainstreamsprogrammingtodayisdoneinaprocedurallanguage.Theproceduralparadigmwasthefirstparadigmtointroducethenotionofabstractionintoprogramdesign.Thepurposeofabstractioninprogrammingistoseparatebehaviorfromimplementation.Proceduresareaformofabstraction.Theprocedureperformssometaskorfunction.Otherpartsoftheprogramcalltheprocedure,knowingthatitwillperformthetaskcorrectlyandefficiently,butwithout内蒙古工业大学本科毕业设计外文文献4knowingexactlyhowtheprocedureisimplemented.THEPROCEDURALPARADIGMWITHADTs.DATAABSTRACTIONisconcernedwithseparatingthebehaviorofadataobjectfromitsrepresentationorimplementation.Forexample,astackcontainstheoperationsPush,Pop,andIsEmpty.Astackobjectprovidesuserswiththeseoperations,butdoesnotrevealhowthestackisactuallyimplemented.Thestackcouldbeimplementedusinganarrayoralist.Usersofthestackobjectdonotcarehowthestackisimplemented,onlythatitperformstheaboveoperationscorrectlyandefficiently.Becausetheunderlyingimplementationofthedataobjectishiddenfromitsusers,theimplementationcaneasilybechangedwithoutaffectingtheprogramsthatuseit.Whenwedesignalgorithms,weoftenneedaparticulardatatypetouseinordertocarryoutthealgorithm'soperations.Thedesignofanalgorithmiseasierifwesimplyspecifythedatatypesofthevariables,withoutworryingabouthowtheactualdatatypeisimplemented.Wedescribethedatatypebyitspropertiesandoperationsandassumethatwhateverimplementationischosen,theoperationswillworkcorrectlyandefficiently.Typesdefinedinthiswayar

1 / 17
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功