@Override
	public Shop readItem(File file, Shop shop){ 
		try {
			scanner = new Scanner(file);
			Scanner lijn = null;
			if(shop == null)
				shop = new Shop();
					
			while(scanner.hasNext()){
				lijn = new Scanner(scanner.nextLine());
				lijn.useDelimiter(";");
				
				String stringType = lijn.next();
				String title = lijn.next();
				String priceString = lijn.next();
				String state = lijn.next();
				String id = lijn.next();
				
				ItemType type = ItemType.valueOf(stringType.toUpperCase());
				double price = Double.parseDouble(priceString);
				
				Item newItem = new Item(type, title);
				newItem.setPrice(price);
				
				if(state.equals("borrowed"))
				{
					String customerID = lijn.next();
					String stringDate = lijn.next();
					DateFormat formatter = new SimpleDateFormat("d-MMM-yyy,HH:mm:ss aaa");
					Date date = formatter.parse(stringDate);
					shop.borrowItem(id, customerID, date);
				}
				if(state.equals("damaged"))
					newItem.setState(new Damaged(newItem));
				//else item is available
				shop.addItem(id, newItem);
			}
			if (scanner!=null){
				scanner.close();
			}
			if (lijn!=null){
				lijn.close();
			}
			
		} catch (Exception e) {
			JOptionPane.showMessageDialog(null, e.getMessage());
		}
		return shop;
	}