public ArrayList<Bed> dataOverwrite(ArrayList<Bed> oldList, 
									ArrayList<Bed> newList)
		{
		boolean flag = true;
		int count = 0;
		int count1 = 0;
		for(int i = 0; i < newList.size(); i++)
			{
			flag = true;
			Bed newBed = newList.get(i);
			String newId = newBed.getId();
			String newRoom = newBed.getRoom();
			String newDate = newBed.getDate();
			double newPrice = newBed.getPrice();
			String newCurrency = newBed.getCurrency(); 
			for(int j = 0; j < oldList.size(); j++)
				{
				Bed oldBed = oldList.get(j);
				String oldId = oldBed.getId();
				String oldRoom = oldBed.getRoom();
				String oldDate = oldBed.getDate();
				boolean oldBooked = oldBed.getBooked();
				if(newId.equals(oldId) && newRoom.equals(oldRoom) &&
					newDate.equals(oldDate))
					{
					if(oldBooked)
						{
						count1++;
						flag = false;
						break;
						}
					oldBed.setPrice(newPrice);
					oldBed.setCurrency(newCurrency);
					oldList.set(j, oldBed);
					flag = false;
					count++;
					break;
					}
				}
			if(flag)
				oldList.add(newBed);
			}
		if(count > 0 || count1 > 0)
			System.out.println("Existing data was found!\n" +
								"Overwrite performed for " + count + " beds!\n" +
							    "Overwrite failed for " + count1 + " beds!(Reason: Booked)");
		return oldList;
		}