-
Exe4_3
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, )
- 2015-06-14 18:22:51下载
- 积分:1
-
Country
这是一个不错的发送彩信的源码,想要研究彩信的朋友可以看一下。(This is a good source send MMS, wanted to study MMS friend can have a look.)
- 2015-05-03 14:06:08下载
- 积分:1
-
Java-learning
Java的学习笔记,对于初学者来说这是个重点,上手会比较容易(Java learning classical notes)
- 2014-04-21 22:50:10下载
- 积分:1
-
ListTouchBottomGravityManyTest
Touch tests for a list where all of the items do not fit on the screen, and the list stacks from the bottom.
- 2014-02-27 13:40:15下载
- 积分:1
-
MQL4-chinese
MQL4命令中文手册,帮助学会如何使用MQL4(MQL4 command Chinese manual to help learn how to use MQL4)
- 2020-07-23 21:38:44下载
- 积分:1
-
jms
一个HornetQ获取和发送JMS消息的例子,还有一个基于Esper,复杂事件处理的例子(A HornetQ get and send JMS messages example, there is one based on Esper, examples of complex event processing)
- 2013-09-12 16:28:53下载
- 积分:1
-
dwr_ajax_login
struts、hibernate、spring和dwr实现的ajax登录,(struts, hibernate, spring and dwr ajax implementation log)
- 2010-11-02 15:44:21下载
- 积分: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
-
java-calculator.txt
实现计算器的功能M+:是计算结果并加上已经储存的数 中断数字输入.M-:从存储器内容中减去当前显示值 中断数字输入.MRC:第一次按下此键将调用存储器内容,第二次按下时清除存储器内容.MR:调用存储器内容.MC:清除存储器内容.(Calculator function)
- 2012-12-30 13:00:46下载
- 积分:1
-
c2007629214256
在管理员表中初始插入数据 usn: admin, pwd: 21232F297A57A5A743894A0E4A801FC3
初始用户账号/密码: admin (密码为 md5 加密)
SRC/: JAVA 程序源文件目录
src/Conn.java 是数据库连接的类 请先修改里面的数据库连接
src/Gload.java 全局类 实现一些全局功能
mssqlserver.jar, msutil.jar, msbase.jar ------- SQL Server 的驱动包,请导入工程
DataBase/图书_Data.MDF: SQL Server 2000 数据库文件, 可直接附加
CreateTab.sql SQL Server 建表脚本(In an administrator to insert the initial data table usn: admin, pwd: 21232F297A57A5A743894A0E4A801FC3 initial user account/password: admin (password is md5 encrypted) SRC /: JAVA program source file directory src/Conn.java is a database connection class, please modify the database connection inside the src/Gload.java overall category realize the overall function of a number of mssqlserver.jar, msutil.jar, msbase.jar- SQL Server driver package, please import Engineering DataBase/books _Data.MDF: SQL Server 2000 database documents, can be directly attached CreateTab.sql SQL Server to build table script)
- 2008-07-01 01:45:14下载
- 积分:1