问题 单项选择题

在MGB1420万能磨床晶闸管直流调速系统控制电路的辅助环节中,当负载电流大于额定电流的1.4倍时,( )饱和导通,输出截止。

A.V38

B.V39

C.V29

D.RP2

答案

参考答案:B

翻译题
问答题

本题程序中实现了一个“生产者一消费者问题”。生产者产生一个随机数存入DataPool类中,消费者从中取出数据。DataPool类一次只能存放一个数据。请更正题中带下划线的部分。
注意:不改变程序的结构,不得增行或删行。
class DataPool

private int data;
private boolean isFull;
public DataPool()

isFull=false;

public synchronized void putData(int d)

if(isFull= =true)

try

this.notify();

catch(InterruptedException e)


data=d;
isFull=true;
System.out.println("生产了一个数据:"+data);
this.notify();

public synchronized int getData()

if(isFull= =false)

try

this.wait();

catch(InterruptedException e)


isFull=false;
System.out.println("消费了一个数据"+data);
this.wait();
return this.data;

boolean getIsFull()

return isFull;


class Producer extends Thread

DataPool pool;
public Producer(DataPool pool)

this.pool=pool;

public void run()

for(int i=0; i<10; i++)

int data=(int) (Math.random()*1000);
try
//用于生产数据
sleep(data);

catch(InterruptedException e)

pool.putData(data);



class Consumer implements Runnable

DataPool pool;
public Consumer(DataPool pool)

this.pool=pool;

public void run()

for(int i=0; i<10; i++)

int data=pool.getData();
try
//用于处理数据
sleep((int) (Math.random()*1000));

catch(InterruptedException e)




public class advance

public static void main(String[] args)

Data Pool pool=new Data Pool();
Producer pro=new Producer(pool);
Runnable con=new Consumer(pool);
Thread conTh=new Thread(con);
pro.start();
conTh.start();