一天所需热量:用C语言或java描述这一过程__

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/29 08:08:11
设在房内c处有一机器人,在a和b处各有一张桌子,a桌上有一个盒子.为了让机器人从c处出发把盒子从a处拿到b处的桌上,然后再回到c处
可以帮我把程序补充完整吗?

class where \\位置
{
private int x,y,z;
}
class desk \\桌子
{
private where w;
private boolbean hasbox;

}

calss Robot \\机器人
{
private where place;
public Robot(where w)\\初始位置
{
place.x=w.x;
place.y=w.y;
place.z=w.z;
}
public run(where w,where w2)
{
''''//跑的过程;

}
public getBox(desk d)
{....
}
public bringBox(desk d)
{....
}
}
public class TextRobot
{
public static void main(Strint[]args)
{
Where c = new Where();
Where a = new Where();
Where b = new Where();
Robot r = new Robot(c);
r.getBox(a);
r.run(a,b);
r.brintBox(b);
r.run(b,c);
}
}