-
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
-
Java.pdf
关于java思想的解析,适合刚开始接触和深入学习java程序员,本书讲的很细致。(Analytic thinking about java, for the beginning of contacts and in-depth learning java programmer, the book said very detailed.)
- 2015-03-23 16:30:47下载
- 积分:1
-
2003814983546
一个支持servlet的web服务器
(The web server that supports servlet)
- 2010-01-03 10:29:53下载
- 积分:1
-
SpcommSMS
用spcomm控件写的一个短信收发与串口
- 2009-10-10 17:49:00下载
- 积分:1
-
spring-demo
spring demo as spring boot
- 2020-06-25 14:40:02下载
- 积分:1
-
oscache
oscache的缓存实例,可以用于学习二级级缓存,及应用到项目中,加速数据库查找效率。(oscache cache instance, can be used to study the two-level cache, and applied to the project, to accelerate the efficiency of database lookup.)
- 2012-07-10 15:53:32下载
- 积分: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
-
人力资源管理系统
说明: com.ssh.action action
com.ssh.dao dao
com.ssh.domain 实体类
beans.xml 修改数据库和具体配置
struts.xml struts配置
http://127.0.0.1:8080/ssh-1/ 系统管理页面
http://127.0.0.1:8080/ssh-1/Clogin.jsp 签到请假页面
工资分析后才能够查询工资(Wage analysis before you can inquire about wages)
- 2020-06-16 08:00:02下载
- 积分:1
-
DefaultFileComparator
Default File Comparator implements Comparator, Serializable.
- 2014-01-22 14:13:04下载
- 积分:1
-
shopping
一个简单的购物车程序,用eclipse编写,servlet实现,数据库用的是SQL2000,可实现用户管理、商品数量的增加、修改、删除等功能。(A simple shopping cart application, written with the eclipse, servlet implementation, the database is used SQL2000, enable users to manage, increase in the number of goods, modify, and delete functions.)
- 2011-06-08 10:55:08下载
- 积分:1