日期:2014-05-20 浏览次数:20827 次
package mywares;
/**
*
* @author Administrator
*/
import java.io.*;
import java.util.*;
public class Ware implements Serializable
{
public int id;
private static final long serialVersionUID = 1L;
@Override
public int hashCode() {
int hash = 7;
hash = 89 * hash + this.id;
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Ware other = (Ware) obj;
if (this.id != other.id) {
return false;
}
return true;
}
public String name;
public int num;
public int my_money;
public int sell_money;
public Ware(int id, String name, int num, int my_money, int sell_money)
{
this.id = id;
this.name = name;
this.num = num;
this.my_money = my_money;
this.sell_money = sell_money;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
public int getMy_money() {
return my_money;
}
public void setMy_money(int my_money) {
this.my_money = my_money;
}
public int getSell_money() {
return sell_money;
}
public void setSell_money(int sell_money) {
this.sell_money = sell_money;
}
@Override
public String toString() {
return "商品:" + "商品号:" + id + ",商品名:" + name + ", 库存数量:" + num + ", 入库价格:" + my_money + ", 销售价格:" + sell_money ;
}
}
import java.util.Scanner;
import java.util.HashMap;
import java.util.Iterator;
import java.io.* ;
import java.text.*;
import java.util.*;
import java.awt.*;