You can implement the drag and drop functionality like this:
WebElement element = driver.findElement(By.name("source"));
WebElement target = driver.findElement(By.name("target"));
(new Actions(driver)).dragAndDrop(element, target).perform();
Source: https://www.seleniumhq.org/docs/03_webdriver.jsp#drag-and-drop
You can look at Selenium's documentation from above for further reference.