登录
首页 » Java » Exe4_3

Exe4_3

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

  • CrystalPlayer
    同学写用Java写的 模仿千千静听音乐播放器源代码,界面超漂亮,程序代码简洁,不过程序比较综合,估计没有基础的JAVA朋友不好看懂,想研究一下的可下载试试。编译时需要在Eclipse下打开,并导入源码包目录下的必要库文件才行。(Students to write in Java to write the music player to imitate TTPlayer source code, the interface super-nice, clean code, but more comprehensive program, it is estimated based on JAVA friends did not understand well, to look at the downloadable try. Compile time to open in Eclipse, and import the necessary source package library directory the job.)
    2011-10-31 09:11:39下载
    积分:1
  • SpinnerButtonDemo
    spinner的应用源码,非常酷炫,很好的资源(spinner application source code, very cool, very good resource)
    2014-02-05 19:53:23下载
    积分:1
  • ClockDemo
    非常实用的java小程序,实现了ClockDemo功能,对初学者帮助很大,希望能帮到您。(Very useful java applet to achieve ClockDemo function, great help for beginners, hoping to help you. )
    2012-02-02 17:34:17下载
    积分:1
  • timetable
    一款Java版的课程表软件 联合开发网 - pudn.com
    2015-06-02 19:23:48下载
    积分:1
  • TrmSim
    基于信誉的无线传感器网络模型。用java编写的(Trust and Reputation Models Simulator for Wireless Sensor Networks。the program is implemented by java)
    2013-11-10 22:05:55下载
    积分:1
  • CalculatorDemo
    一个简单的Java计算器Demo,主要涉及swing和awt的应用。(A simple calculator program.Mainly related to the application of swing and awt.)
    2016-03-11 14:44:55下载
    积分:1
  • java学生宿舍管理系统(源码+数据库+设计文档)
    java学生宿舍管理系统(源码+数据库+设计文档)
    2020-06-09下载
    积分:1
  • mp3
    只是简单的功能。 1.播放功能 2.暂停功能 3.停止播放功能 (Just a simple function.1playing function2pause function3stop playing function)
    2012-05-18 22:47:30下载
    积分:1
  • Librarian
    说明:  java docuument for libraay
    2020-06-23 16:20:02下载
    积分:1
  • UiDocumentTreeEditPart
    Implementation of {@link UiElementTreeEditPart} for the document.
    2013-12-11 13:16:48下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载