登录
首页 » Java » Exe4_3

Exe4_3

于 2015-06-14 发布 文件大小:1KB
0 174
下载积分: 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 个回复

  • Currency
    This class represents a currency as identified in the ISO 4217 currency codes.
    2013-12-19 11:08:51下载
    积分:1
  • NamespaceMappings
    This member is continually incremented when new prefixes need to be generated Source Code for Andriod.
    2013-12-16 11:34:16下载
    积分:1
  • Calculator
    Caculator is veri good which is helpful.eds
    2014-12-14 21:04:44下载
    积分:1
  • JDK_API_1_6_zh_CN
    java的API,方便大家查阅,可以简单查看(the java API to facilitate access, you can simply view)
    2013-01-05 13:16:12下载
    积分:1
  • regress-85880
    Arguments object of g(){f()} should not be null.
    2014-02-13 12:08:59下载
    积分:1
  • Design-and-develop
    智能家居的设计和开发应用,关于智能家居的设计和开发应用(Intelligent home control system design and development, on the smart home control system design and development)
    2013-09-28 13:41:41下载
    积分:1
  • text_format_test
    Test for google.protobuf.text_format.
    2014-03-08 14:13:27下载
    积分:1
  • ThreadTest
    说明:  java 中的多线程程序实例,包括:线程的创建方式、线程的生命周期、线程的方法(启动、挂起、唤醒、优先级等)(The multi-threaded java program example)
    2011-04-18 07:35:49下载
    积分:1
  • Calculator
    java代码写的大数操作,主要实现大数的加减乘除。。值得一看。。(java code written in large numbers operation, the main achievement of large numbers of arithmetic. . Worth a visit. .)
    2013-06-20 22:04:18下载
    积分:1
  • Search
    天气转化,把天气转化成你想要的格式,好好的程序,呵呵(Weather Conversion)
    2011-05-15 15:04:59下载
    积分:1
  • 696518资源总数
  • 105895会员总数
  • 18今日下载