-
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
-
图书管理系统 booksystem
说明: 用户登录上后可以进行借书管理,当书籍数量不足时借书失败,当读者借书成功后系统会自动规定读者还书时间(After the user logs in, he can manage the borrowing of books. When the number of books is insufficient, he fails to borrow books. When the reader borrows books successfully, the system will automatically stipulate the time for the reader to return the books.)
- 2020-06-18 01:00:01下载
- 积分:1
-
rational
建立有理数类,实现有理数的四则预算,实现输出分数形式和小数形式。(Establish rational category, the four realize rational budget to achieve the output fractional and decimal form.)
- 2014-03-27 03:46:41下载
- 积分:1
-
酒店信息管理开房系统
这是我们的作业,酒店信息管理开房系统,希望大家有所收获啊啊啊啊(This is our job, hotel information management room opening system)
- 2020-06-19 00:20:02下载
- 积分:1
-
internal_error
Class Dumper extends Base Dumper Source Code for Andriod.
- 2014-01-08 14:03:58下载
- 积分:1
-
jabsorb-1.3.2
jabsorb 是一个简单的轻量级的JSON-RPC 库,用于实现浏览器上的 JavaScript 和 Java 服务器端之间的通讯。(jabsorb is a simple lightweight JSON-RPC library used to implement communications JavaScript on the browser and the server-side Java between.)
- 2013-12-10 10:47:40下载
- 积分:1
-
TankClient
简单完成坦克作战程序,主要利用Java,在对应平台完成编码、运行(Using Java to complete the compilation of classical game tank battle, complete the operation of tank battle in different machines)
- 2019-05-18 08:26:48下载
- 积分:1
-
jJaava2Demo
Java2Demo版,不错的东东,需要先安装j2sdk(Java2Demo edition of the Eastern Yes, the need for installing j2sdk)
- 2006-08-13 14:21:19下载
- 积分:1
-
jiugongpaixu
九宫图排序,实现记录功能,中间为空,沿四周分布(Figure Jiugong sort of record function, the middle is empty, surrounded by distribution along the)
- 2011-05-26 19:02:21下载
- 积分:1
-
波迅+BHU-5G+网桥+编程器固件+AR9344芯片.bin
ar9344网桥固件波讯波迅+BHU-5G+网桥+编程器固件+AR9344芯片.bin(Ar9344 bridge firmware wave wave fast +BHU-5G+ bridge + programmer firmware +AR9344 chip.Bin)
- 2020-08-01 19:28:36下载
- 积分:1