package com.google.sps.agents;
 
// Imports the Google Cloud client library
import com.google.cloud.dialogflow.v2.QueryInput;
import com.google.cloud.dialogflow.v2.QueryResult;
import com.google.protobuf.Struct;
import com.google.protobuf.Value;
import com.google.sps.data.Output;
import com.google.sps.agents.Agent;
import java.io.IOException;
import java.util.Map;
 
/**
 * Currency Agent
 */

public class Currency implements Agent {
  private final String intentName;
  private String currencyFrom;
  private String currencyTo;
  private Double amount;
  private String fulfillment = null;;
  private String diplay = null;
  private String redirect = null;

  public Currency(String intentName, Map<String, Value> parameters) {
	  this.intentName = intentName;
	  setParameters(parameters);
  }

  @Override 
  public void setParameters(Map<String, Value> parameters) {
	  currencyFrom = parameters.get("currency-from").getStringValue();
	  currencyTo = parameters.get("currency-to").getStringValue();
	  amount = parameters.get("amount").getNumberValue();

	  fulfillment = "Redirecting for conversion";
	  String baseURL = "http://www.google.com/search?q=";
	  String endURL = String.join("+", "Convert", String.valueOf(amount), currencyFrom, "to", currencyTo); 
	  redirect = baseURL + endURL;
  }

  @Override
  public String getOutput() {
	  return fulfillment;
  }

  @Override
  public String getDisplay() {
	  return display;
  }

  @Override
  public String getRedirect() {
	  return redirect;
  }
}

@@ -725,17 +725,18 @@
 ters) %7B%0A
-%09
+  
   this.i
@@ -759,17 +759,18 @@
 ntName;%0A
-%09
+  
   setPar
@@ -869,17 +869,18 @@
 ters) %7B%0A
-%09
+  
   curren
@@ -938,17 +938,18 @@
 alue();%0A
-%09
+  
   curren
@@ -1003,17 +1003,18 @@
 alue();%0A
-%09
+  
   amount
@@ -1060,17 +1060,18 @@
 lue();%0A%0A
-%09
+  
   fulfil
@@ -1108,17 +1108,18 @@
 rsion%22;%0A
-%09
+  
   String
@@ -1164,17 +1164,18 @@
 ch?q=%22;%0A
-%09
+  
   String
@@ -1270,17 +1270,18 @@
 cyTo); %0A
-%09
+  
   redire
@@ -1346,25 +1346,26 @@
 tOutput() %7B%0A
-%09
+  
   return ful
@@ -1418,25 +1418,26 @@
 Display() %7B%0A
-%09
+  
   return dis
@@ -1495,9 +1495,10 @@
 ) %7B%0A
-%09
+  
   re

Update Currency.java