java上机实验答案与解析

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

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

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

资源描述

为搞好山东省交通科学研究所研发基地项目的结算审计工作,我跟踪审计部特针对本项目作如下要求,请各施工单位、供货单位遵照执行:andperformancetestcopiesoftherecord.Ifnecessary,reviewshouldbecarriedout;4)forspringhangers(includedsimplespring,hangersandconstantsupporthangers)itshouldalsoberecognizedassettingandlockingofloads.5)checkthesurfacequality,foldedlayeringandwithoutcracks,rustandotherdefects.5)aftercompletionofthetestandcontroldrawingnumberonebyone,byseriesbaled.Coloralloysteelparts,thepartsmarkinginstallationlocationandrotationaboutthedirectionyouwant.7.3.14.hangersinstallation7.3.14.1hangerlayouta.acleardesignofhangershouldbeinstalledstrictlyinaccordancewiththedrawingsanddesignsshallnotbeinstalledwrong,missing,etc.B.ownarrangementofpipingsupportandhangersetandselectionshouldbebasedoncomprehensiveanalysisofgenerallayoutofpipingsystems;coldinstallationofsteampipewithparticularattentionreservedforcompensationofthermalexpansiondisplacementandorientation.C.supportsystemsshouldberationaltowithstandpipeloads,staticloadandincidentalload;reasonablepipingdisplacement;guaranteedundervariousconditions,stressarewithintheallowedrange.Strength,stiffness,andmeetrequirementstopreventvibrationandsoothingwater,withoutaffectingtheadjacentequipmentmaintenanceandotherpipinginstallationandexpansion.D.equipmentconnectedtotheinterfacetomeetpipelinethrust(torque)limitrequirements;increasethestabilityofpipingsystemstopreventpipeline...Tubewallthickness(mm)2-34-67-10weldformnoslopemouthweldstrengtheningheighth(mm)1-1.51.5-2weldwidthb(mm)5-67-6hasslopemouthweldstrengtheningheighth(mm)1.5-22weldwidthb(mm)coverhadeachedgeslopemouthabout2mmargonarcweldingweldstrengtheningsurfaceheightandwidthtubewallthickness(mm)2--33--45--6weldformweldstrengtheningheighth(mm)1-1.51.5-22-2.5widthb(mm)JAVA上机实验题答案与解析实验一Java程序编程1.编写一个Java应用程序,输出内容为Hello!。注:文件位置位于e:\2:\Hello.java编译:(1)e:(2)cd2(3)javacHello.java(4)javaHello2.编写一个Java小应用程序,输出内容为我一边听音乐,一边学Java。第一步编写importjava.awt.*;importjava.applet.*;publicclassMyAppletextendsApplet{publicvoidpaint(Graphicsg){g.drawString(我一边听音乐,我一边做java,25,25);}}第二步在DOS环境中编译(....javacMyApplet.java)第三步使用记事本编写appletcode=MyApplet.classheight=200width=120/applet第四步将记事本文件名命名为MyApplet.html第五步打开MyApplet.html实验二类的定义1.编写Java应用程序,自定义Point类,类中有两个描述坐标位置的double变量x,y,利用构造方法,实现对Point对象p1,p2初始化,p1和p2对应坐标分别为(15,20),(10,30);定义方法getX(),getY()分别获得点的横坐标和纵坐标;定义方法setX(),setY()分别获得点的横坐标和纵坐标;并且把p1和p2输出;publicclassPoint{doublex,y;Point(doublex,doubley){this.x=x;this.y=y;}doublegetX(){returnx;}doublegetY(){returny;}voidsetX(doublex){this.x=x;}为搞好山东省交通科学研究所研发基地项目的结算审计工作,我跟踪审计部特针对本项目作如下要求,请各施工单位、供货单位遵照执行:andperformancetestcopiesoftherecord.Ifnecessary,reviewshouldbecarriedout;4)forspringhangers(includedsimplespring,hangersandconstantsupporthangers)itshouldalsoberecognizedassettingandlockingofloads.5)checkthesurfacequality,foldedlayeringandwithoutcracks,rustandotherdefects.5)aftercompletionofthetestandcontroldrawingnumberonebyone,byseriesbaled.Coloralloysteelparts,thepartsmarkinginstallationlocationandrotationaboutthedirectionyouwant.7.3.14.hangersinstallation7.3.14.1hangerlayouta.acleardesignofhangershouldbeinstalledstrictlyinaccordancewiththedrawingsanddesignsshallnotbeinstalledwrong,missing,etc.B.ownarrangementofpipingsupportandhangersetandselectionshouldbebasedoncomprehensiveanalysisofgenerallayoutofpipingsystems;coldinstallationofsteampipewithparticularattentionreservedforcompensationofthermalexpansiondisplacementandorientation.C.supportsystemsshouldberationaltowithstandpipeloads,staticloadandincidentalload;reasonablepipingdisplacement;guaranteedundervariousconditions,stressarewithintheallowedrange.Strength,stiffness,andmeetrequirementstopreventvibrationandsoothingwater,withoutaffectingtheadjacentequipmentmaintenanceandotherpipinginstallationandexpansion.D.equipmentconnectedtotheinterfacetomeetpipelinethrust(torque)limitrequirements;increasethestabilityofpipingsystemstopreventpipeline...Tubewallthickness(mm)2-34-67-10weldformnoslopemouthweldstrengtheningheighth(mm)1-1.51.5-2weldwidthb(mm)5-67-6hasslopemouthweldstrengtheningheighth(mm)1.5-22weldwidthb(mm)coverhadeachedgeslopemouthabout2mmargonarcweldingweldstrengtheningsurfaceheightandwidthtubewallthickness(mm)2--33--45--6weldformweldstrengtheningheighth(mm)1-1.51.5-22-2.5widthb(mm)voidsetY(doubley){this.y=y;}publicstaticvoidmain(String[]args){Pointp1=newPoint(15,20);//初始化Pointp2=newPoint(10,30);System.out.println(横坐标为+p1.x+纵坐标为+p1.y);System.out.println(横坐标为+p2.getX()+纵坐标为+p2.getY());}}运行结果:横坐标为15.0纵坐标为20.0横坐标为10.0纵坐标为30.02.编写Java应用程序,自定义Circle类,类中有两个double变量r,s,一个类变量pi,利用构造方法实现对半径是3和5.5的初始化,自定义getArea方法实现圆面积求解;publicclassCircle{doubles,r;staticdoublepi=3.;publicCircle(doubler){this.r=r;}doublegetArea(){this.s=pi*r*r;returns;}publicstaticvoidmain(String[]args){Circlec1=newCircle(3);Circlec2=newCircle(5.5);System.out.println(c1.getArea());System.out.println(c2.getArea());}}实验三类的继承和多态性1.(1)编写一个接口ShapePara,要求:接口中的方法:intgetArea():获得图形的面积。intgetCircumference():获得图形的周长(2)编写一个圆类Circle,要求:圆类Circle实现接口ShapePara。该类包含有成员变量:radius:public修饰的double类型radius,表示圆的半径。x:priv

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

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

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

×
保存成功