- thread java线程编程
- snakenumber 蛇形数 输入n
- 图像处理(C++) 用c++代码编写的傅里叶变换算法
- 202-203-9635 Mixtape Download: Fetty Wap – “The Official Mixtape” Hosted By @OfficialYoungRB Fetty Wap is easily the hottest artist coming out of New Jersey. This weekend
- C# 股票软件,带K线解析以及画图和一些个指标 C# 股票软件
- Java大作业 益智小游戏“见缝插针” 游戏的玩法是鼠标点击释放小球
文件名称:JAVA面向对象编程-试卷B
介绍说明--下载内容来自于网络,使用问题请自行百度
定义一个交通工具类Traffic,该类包含属性:车轮的数量、行驶速度;同时还包含行驶的方法,并包含有参和无参的构造方法。请分别定义汽车类Car(包含油耗的属性,有参的构造方法)、火车类Train(无参的构造方法)、飞机类Plane(包含最大航程的属性,包含无参和有参的构造方法),让他们继承Traffic,并重写行驶的方法。在测试类中分别创建三个子类的对象,并调用行驶的方法。((A vehicle class Traffic is defined, which contains attributes: the number of wheels, the speed of travel, and the method of driving, including the parametric and parametric construction methods. Please define auto Car (with the construction method of ginseng contains fuel properties), Train (train class construction method of no arguments), class Plane (including aircraft attributes, the maximum range contains no parameters and construction method of ginseng), let them inherit the Traffic method, and override driving. In the test class, three objects of the subclass are created, and the driving method is called. ()
相关搜索: java考试题
(系统自动生成,下载前可以参看下载内容)
下载文件列表
JAVA面向对象编程-试卷B.doc