欢迎来到天天文库
浏览记录
ID:20602089
大小:100.00 KB
页数:8页
时间:2018-10-14
《基于jsp校园二手交易系统的设计与实现外文翻译》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、I.SimpleWcwantedtobuildasystemthatcouldbeprogrammedeasilywithoutalotofcso-tcrictrainingandwhichleveragedtoday’sstandardpractice.SoeventhoughwefoundthatC++wasunsuitable,wedesignedJavaascloselytoC++aspossibleinordertomakethesystemmorecomprehensible.Javaomitsmanyrarelyused,poorly
2、understood,confusingfeaturesofC++that,inourexperience,bringmoregriefthanbenefit.ThesyntaxforJavais,indeed,acleaned-upversionofthesyntaxforC++.Thereisnoneedforheaderfiles,pointerarithmetic(orevenapointersyntax),structures,unions,operatoroverloading,virtualbaseclasses,andsoon.(S
3、eetheC++notesinterspersedthroughoutthetextformoreonthedifferencesbetweenJavaandC++.)Thedesignersdidnot,however,attempttofixalloftheclumsyfeaturesofC++.Forexample,thesyn-taxoftheswitchstatementisunchangedinJava.IfyouknowC++,youwillfindthetran-sitiontotheJavasyntaxeasy.Ifyouareu
4、sedtoavisualprogrammingenvironment(suchasVisualBasic),youwillnotfindJavasimple.Thereismuchstrangesyntax(thoughitdoesnottakelongtogetthehangofit).Moreimportant,youmustdoalotmoreprogramminginJava.ThebeautyofVisualBasicisthatitsvisualdesignenvironmentalmostautomaticallypro-vidcsa
5、lotoftheinfrastructureforanapplication.Theequivalentfunctionalitymustbeprogrammedmanually,usuallywithafairbitofcode,inJava.Thereare,however,third-partydevelopmentenvironmentsthatprovide“drag-and-drop”-styleprogramdevelopment.2.ObjectOrientedSimplystated,object-orienteddesignis
6、atechniqueforprogrammingthatfocusesonthedata(=objects)andontheinterfacestothatobject.Tomakeananalogywithcarpentry,an“object-oriented”carpenterwouldbemostlyconcernedwiththechairhewasbuilding,andsecondarilywiththetoolsusedtomakeit;a“non-object-oriented”carpenterwouldthinkprimari
7、lyofhistools.Theobject-orientedfacilitiesofJavaarcessentiallythoseofC++.Objectorientationhasprovenitsworthinthelast30years,anditisinconceivablethatamodernprogramminglanguagewouldnotuseit.Indeed,theobject-orientedfeaturesofJavaarecomparabletothoseofC++.Themajordifferencebetween
8、JavaandC++liesinmultipleinheritance,whichJavahasreplacedwitht
此文档下载收益归作者所有