-
Exe4_3
3.已知车辆(Vehicle)包括机动车(MotoVehicle)和非机动车(NonMotorVehicle)2种。小汽车(Car)、公交车(Bus)等属于机动车,自行车(Bicycle)等属于非机动车。随着能源技术的发展,出现了电动自行车(ElectricBicycle)、电动小汽车(ElectricCar)、天然气公交车(NaturalGasBus)等新型车辆。车辆的共同特征是都能够运行(run),并且有唯一的5位车牌号(LicenseNumber)。机动车的共同特征是采用燃油发动机(FuelEngine),且能够驾驶(drive)。自行车的共同特征是能够骑行(ride)。电动车辆的共同特征是由电池(Battery)驱动。天然气车辆的共同特征是采用天然气(NaturalGas)作为动力。
要求:
(1)设计一个类体系描述上述车辆,写出它们的属性和方法。
(2)一家公司(Company)拥有10辆普通小汽车、5辆公交车、2辆电动小汽车和1辆天然气公交车,要求写一个方法listVehicles()显示所有车辆的信息(车牌号以及采用的动力)。
程序文件命名为Exe4_3.java。(3. Known vehicle (Vehicle) including motor vehicle (MotoVehicle) and non-motorized (NonMotorVehicle) 2 species. Cars (Car), bus (Bus), etc. to motor vehicles, bicycles (Bicycle), etc. are non-motor vehicles. With the development of energy technologies, the emergence of electric bicycles (ElectricBicycle), electric cars (ElectricCar), natural gas buses (NaturalGasBus) and other new vehicles. A common feature of the vehicle is able to run (run), and there are only five license plate number (LicenseNumber). Common feature is the use of a motor vehicle fuel engine (FuelEngine), and is capable of driving (drive). Common feature is the ability to ride a bike (ride). Common characteristics of the electric vehicle is driven by a battery (Battery). A common feature is the use of natural gas vehicles (NaturalGas) as the driving force.
Claim:
(1) describe the design of a class system of the vehicle, write their properties and methods.
(2) a company (Company) owns 10 ordinary cars, five buses, )
- 2015-06-14 18:22:51下载
- 积分:1
-
clean-code-CN
代码整洁之道 PDF中文版
大师级人物Robert C.Martin的大名鼎鼎著作。都是经典的肺腑之言。
好代码和糟糕的代码之间的区别:如何编写好代码,如何将糟糕的代码转化为好代码:如何创建好名称、好函数、好对象和好类;如何格式化代码以实现其可读性的最大化:如何在不妨碍代码逻辑的前提下充分实现错误处理;如何进行单元测试和测试驱动开发。
(The code tidy Road PDF Chinese gurus Robert C.Martin famous writings. Are classic heartfelt words. The difference between good code and bad code: how to write good code, how bad code into good code: how to create a good name, good functions, good objects, and good classes how to format the code in order to achieve its readability the maximization of: how to code logic without prejudice to the premise of the full realization of the error handling how unit testing and test-driven development.)
- 2013-02-01 17:14:41下载
- 积分:1
-
Substring
按照字符串的长度截取相应的字符串,加入循环条件实现长度在11个字符内的字符串批量切词~(In accordance with the length of the string interception corresponding string, add the length of the loop condition to achieve within the 11 character string batch segmentation ~)
- 2013-08-09 20:37:45下载
- 积分:1
-
OrderSystem
说明: 吃货系统。点菜查看菜单,结账,点赞评论等各种功能(Eating system. Ordering menu, checkout, comment and other functions)
- 2020-06-20 05:20:02下载
- 积分:1
-
JAVA
Write a database program that stores details of a photograph collection.
- 2008-06-05 17:06:55下载
- 积分:1
-
83257544
能够准确读取flash以及jpg,gif,bmp等格式文件的大小()
- 2018-05-15 18:40:04下载
- 积分:1
-
baszd
开发环境是MyEclipse,服务器采用tomcat 开发出的一个基于Web技术的BS结构管理系统(The development environment is MyEclipse, server using tomcat developed a BS structure management system based on Web technology)
- 2017-05-29 19:20:11下载
- 积分:1
-
jiudianguanlixitong
很好的酒店管理系统 (best software )
- 2009-06-02 18:49:37下载
- 积分:1
-
xp_ie
context.htc /mbar.htc 属性说明(仿xp多级菜单 不限级)
属性 说明 默认值 备注
xmlsrc : xml文档路径 无 必须指定,xml文档不能出错
text :显示的文本 无
id :选项的id 无
onclick :选择时执行的脚本 无
accessKey:快捷键 无
check :是否选定(yes/no) no
enable :使能(yes/no) yes
type :类型(line/选项) 选项
img :图片 无
NOTE:
请在 MSIE 5.5 以上版本浏览
xp_IE 尚未完成(context.htc/mbar.htc attributes (imitation xp multi-level open-level menu) Note default attribute values xmlsrc Remarks : xml files must be no designated trails. xml text files can not make any mistake : the text shows no id : options without onclick id : choose the script without accessKey : no shortcuts check : if selected (yes/no) no enable : enable (yes/no) yes type : Category (line/option) options img : Photo-NOTE : please MSIE 5.5 versions View xp_IE yet to be completed )
- 2006-06-03 11:03:57下载
- 积分:1
-
SwordCanvas
刚下载的一款源代码,不知道有么事功能,大家运行的看看吧(Just downloaded a source code, do not know Why things function, we see it run)
- 2010-10-23 16:14:34下载
- 积分:1