皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【简答题】
设计一个通用程序,用来计算每一种交通工具运行1000km所需的时间,已知每种交通工具的参数都是3个整数a,b,c,已有两种交通工具Car和Plane,其中Car的速度计算公式为”a*b/c”,Plane的速度计算公式为”a+b+c”,现增加一种新的交通工具Ship,其速度计算公式为“a+b/c”. //Common.java public interface Common { public double runTimeer( int a , int b , int c ); // 定义接口方法 } //Car.java public class Car implements Common { public double runTimeer( int a , int b , int c ) { 【 】 } } //Plane.java public class Plane implements Common { public double runTimeer( int a , int b , int c ) { return a + b + c ; } } //Ship.java 【 】 //ComputerTime.java import java.util.Scanner; public class ComputerTime { public static void main(String[] args ) { double v , t ; //v( km /h) 速度 , h(h) 运行时间 int a , b , c ; // 交通工具的参数 a , b &c String vehicleKind []= { "Car" , "Plane", 【 】 }; // 交通工具类型 try { Common vehicle []= { new Car(), new Plane(), 【 】 }; for ( int i =0; i < vehicle . length ; i ++) { Scanner sc = new Scanner(System. in ); System. out .println( "Input " + vehicleKind [ i ]+ " Parameter a,b&c:" ); 【 】 // 键入输入 a,b &c 【 】 // 速度 v 赋值 t =1000/ v ; System. out .println( " 平均速度: " + v + "km/h" ); System. out .println( " 运行时间: " + t + " 小时 " ); } } catch (Exception e ) { System. out .println( " 异常退出 " ); } } } 运行截图如下:
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】乳腺癌根治术备皮范围,错误的是
A.
上起锁骨上窝
B.
下至肋缘
C.
患侧至腋后线
D.
对侧至锁骨中线
E.
包括患侧肩、上臂及腋部,剃除腋毛
【简答题】某大型商贸家企业,高层领导繁忙出差,此时,公司的OA系统中需要领导批阅的流程就处于停滞状态,极大影响了办公效率,给公司正常运行制造了很烦。该企业各部门都向办公室主任抱怨公司的OA系统效率极低,公司领导也对办公室的工作表示不满。我公司的营销人员了解到了这个情况,很快给客户提交了一份移动OA解决方案,方案中针对该公司的问题进行了有针对性的分析,指出由于公司内部流程的不畅,每年会给公司造成上百万元的...
【多选题】安全检查的环节主要有
A.
托运行李物品的检查
B.
手提行李物品检查
C.
出入境登记卡检查
D.
旅客证件检查
E.
旅客身体检查
【单选题】Tammy sells woolen hats in a perfectly competitive market. The marginal cost of producing 1 hat is $24. The marginal cost of producing a second hat is $26 and the marginal cost of producing a third ha...
A.
1 hat
B.
3 hats
C.
2 hats
D.
as many hats as possible
【判断题】If the marginal cost of producing the fifth unit of output is higher than the marginal cost of producing the fourth unit of output, then at five units of output, average total cost must be rising.
A.
正确
B.
错误
【多选题】安全检查的环节主要有
A.
托运行李物品检查
B.
手提行李物品检查
C.
出入境登记卡检查
D.
旅客证件检查
E.
旅客身体检查
【单选题】圆明园 阅读下面文章,完成文后问题。 1一直以为,圆明园是哭泣的。英法联军蹂躏着她的肌体,摧毁着她的骨骼,冲天大火燃烧的是一个民族的自尊,百多年的疼痛如那西洋楼的残臂断垣穿越百年的风雨永远存在——伫立在那西洋楼大水法的遗址前,我无法不感受圆明园的疼痛,感受一个民族的屈辱和疼痛,是那种切肤的痛。 2是十年前,去的圆明园。没有人愿去,说是那么远,又没啥看的。我说我肯定要去。 3是阴凄凄的天,是冷嗖嗖的...
A.
哭泣的圆明园
B.
今非昔比的圆明园
【单选题】If the total cost of producing 10 units is $100 and the marginal cost of the eleventh unit is $21, then which of the following is NECESSARILY true?
A.
Total variable costs of 11 units are $121.
B.
Total fixed costs are $79.
C.
The marginal cost of the tenth unit is more than $21.
D.
The average total cost of 11 units is $11.
【单选题】To maximize profit a perfectly competitive firm supplies a good up to the point at which: a. the marginal revenue is higher than the marginal cost. b. the marginal cost of producing the good is zero. ...
A.
B.
C.
D.
D
【单选题】In the short run, the marginal cost of the first unit of output is $20, the marginal cost of producing the second unit of output is $16, and the marginal cost of producing the third unit of output is ...
A.
12
B.
16
C.
20
D.
48
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题