package com.veggie.src.java;

import com.veggie.src.java.form.Form;
import com.veggie.src.java.form.AbstractFormBuilder;
import com.veggie.src.java.form.AbstractFormBuilderFactory;

public class ReturnController implements Controller
{
  AbstractFormBuilderFactory fbf;
  AbstractFormBuilder fb;
  Form f;

  public ReturnController()
  {

  }

  public Form createForm()
  {
    return f;
  }

}

@@ -21,16 +21,39 @@
 rc.java;
+%0Aimport java.util.List;
 %0A%0Aimport
@@ -196,16 +196,281 @@
 Factory;
+%0Aimport com.veggie.src.java.notification.Notification;%0Aimport com.veggie.src.java.database.AbstractDatabaseManagerFactory;%0Aimport com.veggie.src.java.database.prototype.PrototypeAccountDatabaseManager;%0Aimport com.veggie.src.java.database.TransactionDatabaseManager;
 %0A%0Apublic
@@ -519,16 +519,24 @@
 ler%0A%7B%0A  
+private 
 Abstract
@@ -550,140 +550,816 @@
 lder
-Factory fbf;%0A  AbstractFormBuilder fb;%0A  Form f;%0A%0A  public ReturnController()%0A  %7B%0A%0A  %7D%0A%0A  public Form createForm
+ formBuilder;%0A  private Form form;%0A  Notification notification;%0A%0A  public ReturnController()%0A  %7B%0A    formBuilder = AbstractFormBuilderFactory.getInstance().createFormBuilder();%0A    formBuilder.addField(%22Item ID%22);%0A    form = formBuilder.getResult();%0A  %7D%0A%0A  public Form createForm()%0A  %7B%0A    return form;%0A  %7D%0A  %0A    public Notification submitForm()%0A  %7B%0A      List%3CString%3E formData = form.getData();%0A      int itemid;%0A      try%7B%0A      %09itemid = Integer.parseInt(formData.get(0));%0A      %09TransactionDatabaseManager transactionDBManager = AbstractDatabaseManagerFactory.getInstance().createTransactionDatabaseManager
 ()
+;
 %0A  
-%7B%0A    return f;
+    transactionDBManager.finalizeTransaction(itemid);%0A      %7Dcatch(Exception e)%7B%0A      %09System.out.println(%22Error: incorrect form data%22);%0A      %7D%0A      %0A      return notification;   //???????
 %0A  %7D

Update ReturnController.java