登录
首页 » Java » Exe4_3

Exe4_3

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

  • QueryTask
    A task that gets suggestions from a corpus.
    2014-01-15 10:00:59下载
    积分:1
  • sshlx
    对于新学习SSH的同学很有帮助,对ssh的使用以及应用的实例(SSH for new students to learn helpful, the use of ssh and application examples)
    2011-04-25 17:53:50下载
    积分:1
  • sinDraw
    java手机开发编程语言java2me范例,绘制sin函数。(java programming language java2me mobile development paradigm, drawing sin function.)
    2013-11-03 21:16:03下载
    积分:1
  • com.gmail.dengtao.joe.transport
    个人工作中编写基于java nio的socket封装,基于事件的设计方式这点类似mina,但该框架的主要特点是简单!(Personal work, the preparation of the socket-based java nio package, event-based design approach this like mina, but the main features of the framework is simple! )
    2013-09-28 08:41:35下载
    积分:1
  • uTinyRipper
    说明:  解包贴图文件 Unpackaged Mapping FileUnpackaged Mapping File(Unpackaged Mapping Mapping document)
    2020-06-20 22:40:01下载
    积分:1
  • bibernate.diceng.daima
    实现一些hibernate底层的东西,比较简单,适合初学者(Hibernate the bottom of the achievement of a number of things, relatively simple, suitable for beginners)
    2008-12-22 12:24:42下载
    积分:1
  • mywork
    自己写的java小程序,包括一个邮件界面,并对界面上的控件进行监控,对事件反应并通过命令提示符显示出来(Write their own Java applets, including an e-mail interface, the controls and interface monitoring, incident response and displayed through the command prompt)
    2012-04-02 17:16:28下载
    积分:1
  • Wicket_in_action
    Wicket is a framework that makes building web applications easier and more fun. It boasts an object-oriented programming model that encourages you to write maintainable code and helps you scale your development effort with its facilities for reusable components and separation of concerns.
    2012-12-01 20:18:16下载
    积分:1
  • javachengxu2
    泛型是Java SE 1.5的新特性,泛型的本质是参数化类型,也就是说所操作的数据类型被指定为一个参数。这种参数类型可以用在类、接口和方法的创建中,分别称为泛型类、泛型接口、泛型方法。Java语言引入泛型的好处是安全简单。 (Generic is the Java SE 1.5 new features, the nature of generic type parameters, that is operated by the data type is designated as a parameter. This parameter type can be used in class, the creation of interfaces and methods of the respective category as generic, generic interfaces, generic approach. Java language advantages of the introduction of generic security simple.)
    2009-04-22 19:40:02下载
    积分:1
  • crawljax-2.0
    说明:  该代码通过Myeclipse开发环境使用Java语言实现ajax网页内容的提取。(The code used by Myeclipse Java language development environment ajax web content extraction.)
    2011-03-28 12:19:35下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载