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 CancelReservationController implements Controller
{
  private AbstractFormBuilder fb;
  private Form f;

  public CancelReservationController()
  {
    fb = AbstractFormBuilderFactory.getInstance().createFormBuilder();
  }

  public Form createForm()
  {
    return f;
  }

}

@@ -173,16 +173,153 @@
 Factory;
+%0Aimport com.veggie.src.java.database.AbstractDatabaseManagerFactory;%0Aimport com.veggie.src.java.database.PrototypeAccountDatabaseManager;
 %0A%0Apublic
@@ -408,17 +408,26 @@
 uilder f
-b
+ormBuilder
 ;%0A  priv
@@ -436,16 +436,19 @@
 e Form f
+orm
 ;%0A%0A  pub
@@ -490,17 +490,26 @@
  %7B%0A    f
-b
+ormBuilder
  = Abstr
@@ -565,16 +565,120 @@
 lder();%0A
+    builder.addField(%22User ID%22);%0A    builder.addField(%22Item ISBN%22);%0A    form = formBuilder.getResult();%0A
   %7D%0A%0A  p
@@ -717,17 +717,572 @@
 return f
+orm
 ;%0A  %7D%0A%0A
+  public void submitForm()%0A  %7B%0A  %09  addAccountForm = form;%0A      List%3CString%3E formData = form.getData();%0A      String ISBN;%0A      int id;%0A      try%7B%0A      %09id = Integer.parseInt(formData.get(0));%0A      %09ISBN = formData.get(1);%0A      %7Dcatch(Exception e)%7B%0A      %09System.out.println(%22Error: incorrect form data%22);%0A      %7D%0A      TransactionDatabaseManager transactionDBManager = AbstractFormBuilderFactory.getInstace().createTransactionDatabaseManager();%0A      transactionDBManager.finalizeReservation(id, ISBN);%0A      return notification;   //???????%0A  %7D%0A
 %7D%0A

Add controller thing