-
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
-
Control Course
用于实现对小车的移动进行控制的app源代码(App Source Code for Control of Car Mobility)
- 2019-05-18 16:14:47下载
- 积分:1
-
MagicDrawCommunication
说明: MagicDraw与外部通信的插件程序,通过开发MagicDraw的插件完成MagicDraw与外部软件的通信(Magicdraw plug-in program for external communication)
- 2021-03-02 22:49:33下载
- 积分:1
-
databaseApplication
基于java的mysal数据库应用,学生选课系统。工程文件,包含mysql建表文件(Mysal java-based applications, student elective system. Project file that contains the file mysql built table)
- 2014-12-08 22:10:56下载
- 积分:1
-
宝典2017
说明: JAVA培训机构的资料,供参考学习。有的内容可能不是最新版本(JAVA training institutions for reference learning. Some content may not be the latest version)
- 2020-02-27 14:10:48下载
- 积分:1
-
00219450
关于RMI的一个安全性人证的的问题,我适宜市是()
- 2018-01-27 22:21:49下载
- 积分:1
-
weaktight-poster-1.3rc1
weaktight poster v1.3 is a very useful tool for poker players. using this u can share your hand history via weaktight.com without without loss of time in the browser
- 2014-01-27 09:43:13下载
- 积分:1
-
疯狂java讲义
疯狂java讲义pdf版,讲解细致,适用于java入门资料参考(crazy java instruction.pdf very very good)
- 2020-12-15 10:49:13下载
- 积分:1
-
UserFolderInfo
Represents a folder containing shortcuts or apps Source Code for Java Script.
- 2014-03-12 20:31:25下载
- 积分:1
-
ruichao
java开发的员工管理系统,公司人员配置设备配置等一些列可视化操作。(Some columns java development staff management system, device configuration, such as staffing companies visualization.)
- 2013-12-05 21:58:24下载
- 积分:1