登录
首页 » Java » Exe4_3

Exe4_3

于 2015-06-14 发布 文件大小:1KB
0 250
下载积分: 1 下载次数: 5

代码说明:

  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, )

文件列表:

Exe4_3.java,3496,2014-11-21

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • music
    建议的安卓音乐播放器,很简单的代码,适合新手学习(Andrews recommended music player, a very simple code, suitable for novice learning)
    2013-11-06 16:37:49下载
    积分:1
  • Java-mode
    java 模式介绍 ,singleton factory 等等,对java迷失的学习很有帮助(java model describes a singleton the factory and so on, to learn java lost helpful)
    2012-03-07 17:00:07下载
    积分:1
  • weiqi-415
    说明:  JAVA编写的具有初步走棋功能的围棋程序。(JAVA CODE FOR WEIQI)
    2009-08-26 11:33:13下载
    积分:1
  • SDKSS628(100)+二代证机具100型SDK-V2.6.0
    说明:  神思628(100)开发包 欢迎大家下载(Shensi 628 Development Package)
    2019-05-05 17:02:36下载
    积分:1
  • register
    安装myeclipse之后,新建一个java类,实现免费注册(After installing myeclipse, create a new Java class, free registration)
    2013-04-22 21:31:02下载
    积分:1
  • sort
    石油地震勘探数据处理模块(Java) 数据集合分选(Oil&Gas exploring - seismic data processing modules(java) data sorting part)
    2018-06-25 14:39:27下载
    积分:1
  • avatar
    这是一个上传头像的源代码 可以实现电脑的拍照功能 保存成一大一小照片 可以根据自己的需求开发(This is a picture to upload the source code can be saved as a computer' s camera and a small photo can develop according to their needs)
    2015-02-02 15:08:25下载
    积分:1
  • someproblemsofjava
    一些常见的JAVA面视题,希望能对各位有所帮助.(JAVA face some common as the title, I hope you can help.)
    2009-01-09 19:47:59下载
    积分:1
  • 淘宝客项目(基于HBuilderX)
    淘宝客项目(基于HBuilderX)
    2020-06-26下载
    积分:1
  • EmptyImmutableListMultimap
    Implementation of with no entries.
    2014-01-22 14:17:28下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载