刚开始写一点思路没有然后自己慢慢摸索一点一点写 一点一点改,最后也是皇天不负有心人达到了自己想要的成果。
首先,先把结构文件搭建出来
接着把测试类控制台信息写出来
接着把两个实体类写出来
public class order implements Serializable {
/*
实体类
*/
private Integer id;
private String name;
private String menu;
private Integer copies;
private Integer time;
private String address;
private double money;
private Integer status;
public order(){}
public order(Integer id, String name, String menu, Integer copies, Integer time, String address, double money, Integer status) {
this.id = id;
this.name = name;
this.menu = menu;
this.copies = copies;
this.time = time;
this.address = address;
this.money = money;
this.status = status;
}
public order(String name, String menu, Integer copies, Integer time, String addrss, double money) {
this.name = name;
this.menu = menu;
this.copies = copies;
this.time = time;
this.address = addrss;
this.money = money;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMenu() {
return menu;
}
public void setMenu(String menu) {
this.menu = menu;
}
public Integer getCopies() {
return copies