-
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
-
FrontEnd
java反编译软件 是一个有图形截面的 (err)
- 2007-12-28 13:46:12下载
- 积分:1
-
ADD
自己用java写的计算器
自己用java写的计算器
自己用java写的计算器
自己用java写的计算器(Their own written in java calculator written in java calculator written in java calculator their own written in java calculator)
- 2013-07-17 19:07:39下载
- 积分:1
-
Lychee02120012
二进制算术编码与解码 打包成终端应用程序 有源码 java编写(Arithmetic coding binary & decoding with being packaged into .exe file
java including source code)
- 2015-05-13 22:27:52下载
- 积分:1
-
video
说明: video前端模板,有待开发,开发完,就能用,啊啊啊啊啊啊啊(Vieo front-end template, to be developed, developed, can be used, ah ah ah ah ah ah ah ah ah ah ah ah)
- 2020-06-16 09:40:01下载
- 积分:1
-
tuixiangzhi
说明: 推箱子小游戏。懒羊羊与灰太狼。java实战项目(Push box games. Lazy sheep and Grey Wolf. Java combat project)
- 2020-06-20 05:20:02下载
- 积分:1
-
socket
实现一个简单的超级服务器,支持多协议通信,也支持多协议文件传输(Implement a simple super-server, multi-protocol communication, also supports multi-protocol file transfer)
- 2011-06-30 11:56:02下载
- 积分:1
-
SipProfile
Helper class for creating a {@link SipProfile}.
- 2014-02-25 11:31:22下载
- 积分:1
-
Birch
说明: birch算法是聚类算法的一种,克服了k-means算法的缺点,这里提供了详细的讲解ppt和代码(The birch algorithm is a kind of clustering algorithm, which overcomes the shortcomings of the k-means algorithm. Here is a detailed explanation of ppt and code.)
- 2019-05-10 11:12:28下载
- 积分:1
-
理发店管理系统Beauty
这是一个理发店管理系统,感兴趣的朋友可以下一下,该系统主要是有顾客排队功能(This is a barber shop management system, interested friends can look at the system mainly has customers queuing function)
- 2013-12-13 11:11:53下载
- 积分:1