-
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
-
dwrUtil
dwr工具类,属于对于dwr的封装,希望对大家有帮助,得到大家支持,谢谢(dwr tools, belonging to dwr package, we hope to help, to get everyone to support, thank you)
- 2013-10-28 10:40:39下载
- 积分:1
-
1JSP笔记
jsP个人笔记,十分适合新手学习,建议下载,内容详细(JsP personal notes, very suitable for beginners to learn, it is recommended to download, detailed content)
- 2020-06-24 09:00:02下载
- 积分:1
-
hce-framework
模拟IC卡,javacard模拟的基础框架,javacard hce framework(javacard hce framework)
- 2016-03-11 09:19:15下载
- 积分:1
-
zhangmrit-ruoyi-cloud-master
说明: hdw-dubbo微服务化开发平台,具有统一授权、认证后台管理系统,其中包含具备用户管理、资源权限管理等多个模块,支持多业务系统并行开发,可以作为后端服务的开发脚手架。代码简洁,架构清晰,适合学习和直接项目中使用。 核心技术采用SpringBoot、Du(Hdw Dubbo microservice development platform has a unified authorization and authentication background management system, which includes user management, resource rights management and other modules. It supports the parallel development of multiple business systems and can be used as the development scaffolding of back-end services. The code is concise and the architecture is clear, which is suitable for learning and direct project. The core technology is spring boot and Du)
- 2021-04-05 22:24:44下载
- 积分:1
-
ThreadAction
在Windows的eclipse中查看JVM的所有线程的活动状态(View activity status of all threads in the JVM)
- 2015-04-16 10:04:32下载
- 积分:1
-
swing
JAVA图形界面swing的知识点。全面简练。适合初学者(JAVA swing GUI knowledge points. Comprehensive and concise. Suitable for beginners)
- 2013-11-12 15:33:13下载
- 积分:1
-
student_dorm
说明: 实现简单的学生成绩管理、包括成绩录入、排名、导出不合格成绩等(Realize simple student achievement management, including record entry, ranking, export of unqualified grades, etc.)
- 2019-05-22 21:54:16下载
- 积分:1
-
xungeng
说明: 用于安防上的巡更管理系统,主要是记录巡更人电的巡查时间。便于进行考核等作用。(for Security Patrol on the management system is mainly records-- were patrolling the inspection time. Facilitate evaluation of function.)
- 2006-03-18 09:26:09下载
- 积分:1
-
jpcap-0.6
jpcap是一个中间件,java语言对网络层以下的功能开发并不好,所以jpcap中间件就开发出来了(jpcap is a middleware, java language on the network layer of the functional development of the following is not good, so jpcap out on the development of middleware)
- 2009-04-14 19:13:35下载
- 积分:1