>>777 続き
class Store {
public static final int SHOP = 50;
public static final int TERM = 100;
private Demand demand;
public Store(Demand demand){
this.demand = demand;
show();
}
/** 需要量発生
* @param demand demand
*/
private void show(Demand demand){
demand.show();
}
public int foo(){
int a = new int[Store.SHOP][Store.TERM];
for(){ //省略
a += demand.getDemand();
//省略 }
return a;
}
}
class Simul{
public static void main(String[] args){
Demand demand1 = new Demand();
Store store = new Store(demand1);
java.io.PrintWriter pw = new PrintWriter(System.out);
pw.println("" + store.foo());
}
}