-
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
-
jess-and-java
java与jess相关资料 学习专家系统的同仁们看 很好学哦(java jess information learning expert system colleagues look good to learn Oh)
- 2012-10-17 20:16:05下载
- 积分:1
-
utilities
Object proxy Type Source Code for Java Script.
- 2014-02-13 21:55:51下载
- 积分:1
-
AbstractMessageLite
A partial implementation of the MessageLite interface which implements as many methods of that interface as possible in terms of other methods for Andriod.
- 2013-10-06 00:26:08下载
- 积分:1
-
scaner
java做的端口扫描器,很实用的哦,要码源的mail我。(java port scanner to do, very practical Oh, I want to code the source of the mail.)
- 2010-07-01 10:12:29下载
- 积分:1
-
CreationPDF
creation fichier PDF a partir de n importe quelle format cool
- 2013-12-29 16:10:06下载
- 积分:1
-
项目管理系统
完善的Java项目管理系统网页,自己写的(Improve the Java project management system page, write it myself)
- 2018-01-03 14:27:32下载
- 积分:1
-
javaStack
该源码通过java语言详细描述了栈这种数据结构的实现方法(The source language is described in detail by java stack Realization of this data structure)
- 2010-10-10 11:20:05下载
- 积分:1
-
books
使用eclipse开发的基于java和mysql的图书管理系统(Use eclipse-based library management system developed by java and mysql s)
- 2014-02-26 20:28:45下载
- 积分:1
-
sIGaRRAYtYPEdELTA
ClassObj extends Instance implements.
- 2014-01-08 00:29:32下载
- 积分:1