登录
首页 » Java » Exe4_3

Exe4_3

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

  • javabook
    java外文文献供大家毕业设计之用 希望大家喜欢它(java foreign documents for use in all graduation)
    2021-03-20 11:29:18下载
    积分:1
  • packing
    说明:  用EvoHyp实现一维装箱问题的选择构造超启发式算法。(Implementation of a Selection Constructive Hyper- Heuristic using EvoHyp to solve the One-Dimensional Bin- Packing Problem)
    2020-11-12 17:45:49下载
    积分:1
  • pazu
    好用的web打印插件,适用于小型项目开发,简单方便(Useful web print plug-in, suitable for small-scale project development, simple and convenient)
    2019-01-15 16:11:34下载
    积分:1
  • Pianosimulaonprogram
    用于JAVA ME的游戏代码,供大家学习(Game code for JAVA ME, for all to learn)
    2010-08-05 14:32:02下载
    积分:1
  • Clock
    说明:  一个时钟的源码,可显示日期,可更改皮肤,可选择颜色(A clock source, can display the date, change the skin)
    2009-08-30 12:10:41下载
    积分:1
  • sqljdbc
    JDBC连接数据库的java包,需要的人可以下(JDBC database connection java package requires persons can)
    2014-06-08 17:40:08下载
    积分:1
  • item
    这个是我自己写的一个用于网吧的小程序,可以自动计算包时段时间,免去手动计算烦恼(a toy program for netbar)
    2010-06-18 00:08:56下载
    积分:1
  • Wicked-Cool-Java
    Wicked Cool Java contains 101 fun, interesting, and useful ways to get more out of Java. This isn’t intended as a Java tutorial–it’s targeted at developers and system architects who have some basic Java knowledge but may not be familiar with the wide range of libraries available. Full of example code and ideas for combining them in useful projects, this book is perfect for hobbyists, and professionals will find tips and open-source projects to enhance their code and make their jobs easier. Topics include converting a non-XML text structure into XML using a parser generator, experimenting with a Java simulator for the Cell Matrix, creating dynamic music and sound in Java, working with open-source class libraries for scientific and mathematical applications, and many more.
    2012-10-24 23:52:26下载
    积分:1
  • HappyPlayer-AS
    音乐播放器完成功能 音频播放、定位播放 动感歌词显示 流畅、平滑的歌词滚动 支持歌词字体大小、颜色修改、歌词换行(Music player function Audio playback Dynamic lyrics display Smooth, smooth lyrics scroll Support the font size, color change, lyrics lyrics wrap)
    2017-02-21 20:28:25下载
    积分:1
  • test
    part1 (1)可以在“请输入文件路径和名称:”后面的文本框中输入文件名和路径。 (2)可以在文本区中写文本。 (3)可以在“请输入需要追加的内容:”后面的文本域中输入内容,按回车键之后,其中的内容会添加到文本区中(添加的内容另起一行)。 (4)单击“将文本区的内容写入文件”按钮,文本区中的内容就会被写到指定的文件中。 part2 (1)窗体的标题是“猜数字小游戏”。 (2)单击“得到一个随机数”按钮,系统会产生一个1~10之间的随机整数(使用Math类的方法random( ))。 (3)在“输入您的猜测:”后面的文本框中输入你要猜测的整数,之后单击“确定”按钮。 (4)对你猜测的整数,图形用户界面的最下面会有提示信息,没有猜的时候,显示“无反馈信息”,如果猜大了,显示“猜大了”,如果猜小了,显示“猜小了”,如果猜对了,显示“猜对了”。(其中,蓝色字体是JLabel类的对象调用方法setForeground(Color.blue)实现的。)(Java Simple Graphic Interface)
    2020-12-11 15:59:18下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载