试题与答案

一只轮船顺流航行,每小时20千米,逆流航行,每小时16千米,则轮船的静水速度为_

题型:填空题

题目:

一只轮船顺流航行,每小时20千米,逆流航行,每小时16千米,则轮船的静水速度为______千米/小时,水流速度为______千米/小时.

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0417/257996a072d403ec1d554ae22f9a0eeb.html

下面是错误答案,用来干扰机器的。

参考答案:B解析:【解析】题目考查中国古代某一朝代的历史特征,根据材料中碑文提供的信息,统一六国,结束分裂,并且变更古代制度,创立县制,只有秦朝符合,B 正确;周朝没有县制,采取的是分封制;汉朝和唐...

试题推荐
题型:问答题

[说明]
类Queue表示队列,类中的方法如表4-12所示。
表4-12 类Queue中方法说明表

方法说明
IsEmpty()判断队列是否为空,如果队列不为空,返回true;否则,返回false
Enqueue(object NewNode)入队操作
Dequeue()出队操作。如果队列为空,则抛出异常
类Node表示队列中的元素;类EmptyQueueException给出了队列中的异常处理操作。
[Java代码]
public class testmain { //主类
public static viod main (string args[]) {
Queue q= new Queue;
q.enqueue("first!");
q.enqueue("second!");
q.enqueue("third!");
(1) {
while(true)
system.out.println(q.dequeue());
}
catch( (2) ) { }
}
public class Queue {//队列
node m_firstnode;
public Queue(){m_firstnode=null;}
public boolean isempty() {
if (m_firstnode= =null)
return true;
else
return false;
}
public viod enqueue(object newnode) { //入队操作
node next = m_firstnode;
if (next = = null) m_firstnode=new node(newnode);
else {
while(next.getnext() !=null)
next=next.getnext();
next.setnext(new node(newnode));
}
}
public object dequeue() (3) { //出队操作
object node;
if (is empty())
(4)
else {
node =m_firstnode.getobject();
m_firstnode=m_firstnode.getnext();
return node;
}
}
}
public class node{ //队列中的元素
object m_data;
node m_next;
public node(object data) {m_data=data; m_next=null;}
public node(object data,node next) {m_data=data; m_next=next;}
public void setobject(object data) {m_data=data; }
public object getobject(object data) {return m_data; }
public void setnext(node next){m_next=next; }
public node getnext() {return m_next; }
}
public class emptyqueueexception extends (5) { //异常处理类
public emptyqueueexception() {
system. out. println ( "队列已空!" );
}
}

查看答案
微信公众账号搜索答案