7 publicclass CameraShop{
8     private ItemList saleList = new ItemList();
9     private BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
10   
11   public static void main(String[] args){
12       CameraShop myCameraShop = new CameraShop();
13       myCameraShop.open();
14       myCameraShop.doBusiness();
15       myCameraShop.close();
16   }
17   
18   private void open(){
19       saleList.addItem(new Camera("デジショットC6",5000,15));
20        saleList.addItem(new Memory("メモリーメディア128M",1000,15));
21       showOpenMessage();
22   }
23    
24   private void doBusiness(){
25       while(saleList.isStockExist()){
26         Receipt aReceipt = new Receipt();
27         boolean isPointCardMember = isPointCardMember();
28         for(Iterator it = saleList.iterator();it.hasNext();){
29           Item item = (Item)it.next();
30           ReceiptDetail aReceiptDetail = sell(item);
31           aReceipt.addReceiptDetail(aReceiptDetail);
32         }
33         showResult(aReceipt,isPointCardMember);
34       }
35   }