资源描述:
《基于jsp校园二手交易系统的设计与实现外文翻译》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、1.SimpleWewantedtobuildasystemthatcouldbeprogrammedeasilywithoutalotofeso-terictrainingandwhichleveragedtoday’sstandardpractice.SoeventhoughwefoundthatC++wasunsuitable,wedesignedJavaascloselytoC++aspossibleinordertomakethesystemmorecomprehensible.Javaomitsmanyrarelyused,poorlyunderstood,confusingfe
2、aturesofC++that,inourexperience,bringmoregriefthanbenefit.ThesyntaxforJavais,indeed,acleaned-upversionofthesyntaxforC++.Thereisnoneedforheaderfiles,pointerarithmetic(orevenapointersyntax),structures,unions,operatoroverloading,virtualbaseclasses,andsoon.(SeetheC++notesinterspersedthroughoutthetextfo
3、rmoreonthedifferencesbetweenJavaandC++.)Thedesignersdidnot,however,attempttofixalloftheclumsyfeaturesofC++.Forexample,thesyn-taxoftheswitchstatementisunchangedinJava.IfyouknowC++,youwillfindthetran-sitiontotheJavasyntaxeasy.Ifyouareusedtoavisualprogrammingenvironment(suchasVisualBasic),youwillnotfi
4、ndJavasimple.Thereismuchstrangesyntax(thoughitdoesnottakelongtogetthehangofit).Moreimportant,youmustdoalotmoreprogramminginJava.ThebeautyofVisualBasicisthatitsvisualdesignenvironmentalmostautomaticallypro-videsalotoftheinfrastructureforanapplication.Theequivalentfunctionalitymustbeprogrammedmanuall
5、y,usuallywithafairbitofcode,inJava.Thereare,however,third-partydevelopmentenvironmentsthatprovide“drag-and-drop”-styleprogramdevelopment.2.ObjectOrientedSimplystated,object-orienteddesignisatechniqueforprogrammingthatfocusesonthedata(=objects)andontheinterfacestothatobject.Tomakeananalogywithcarpen
6、try,an“object-oriented”carpenterwouldbemostlyconcernedwiththechairhewasbuilding,andsecondarilywiththetoolsusedtomakeit;a“non-object-oriented”carpenterwouldthinkprimarilyofhistools.Theobject-orientedfacilitiesofJavaareessentiallythoseofC++.Objectorientationhasprovenitsworthinthelast30years,anditisin
7、conceivablethatamodernprogramminglanguagewouldnotuseit.Indeed,theobject-orientedfeaturesofJavaarecomparabletothoseofC++.ThemajordifferencebetweenJavaandC++liesinmultipleinheritance,whichJavahasreplacedwitht