java程序 求大神教我继续怎么写
Goods.javapublicclassGoods{booleanisDanger;Stringname;publicvoidsetIsDanger(booleanbo...
Goods.java
publicclass Goods {
boolean isDanger;
String name;
public void setIsDanger(boolean boo) {
isDanger = boo;
}
public boolean isDanger() {
return isDanger;
}
public void setName(String s) {
name = s;
}
public String getName() {
return name;
}
}
DangerException.java
public class DangerException extends Exception {
String message;
public DangerException() {
message = "危险品!";
}
public void toShow() {
System.out.print(message+" ");
}
}
Machine.java
public class Goods{
booleanisDanger;
Stringname;
public voidsetIsDanger(boolean boo) {
isDanger= boo;
}
publicboolean isDanger(){ 展开
publicclass Goods {
boolean isDanger;
String name;
public void setIsDanger(boolean boo) {
isDanger = boo;
}
public boolean isDanger() {
return isDanger;
}
public void setName(String s) {
name = s;
}
public String getName() {
return name;
}
}
DangerException.java
public class DangerException extends Exception {
String message;
public DangerException() {
message = "危险品!";
}
public void toShow() {
System.out.print(message+" ");
}
}
Machine.java
public class Goods{
booleanisDanger;
Stringname;
public voidsetIsDanger(boolean boo) {
isDanger= boo;
}
publicboolean isDanger(){ 展开
4个回答
展开全部
先说清你想干什么,你的需求是什么,才能考虑往下怎么做啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你这是要做什么????
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询