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;
    private String redirect;

    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 null;
    }

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

@@ -429,20 +429,17 @@
 Agent %7B%0A
-    
+%09
 private 
@@ -463,20 +463,17 @@
 ntName;%0A
-    
+%09
 private 
@@ -493,20 +493,17 @@
 cyFrom;%0A
-    
+%09
 private 
@@ -521,20 +521,17 @@
 encyTo;%0A
-    
+%09
 private 
@@ -541,28 +541,25 @@
 ble amount;%0A
-    
+%09
 private Stri
@@ -572,22 +572,58 @@
 fillment
-;%0A    
+ = null;;%0A%09private String diplay = null;%0A%09
 private 
@@ -637,23 +637,27 @@
 redirect
-;%0A%0A    
+ = null;%0A%0A%09
 public C
@@ -716,24 +716,18 @@
 ters) %7B%0A
-        
+%09%09
 this.int
@@ -748,24 +748,18 @@
 ntName;%0A
-        
+%09%09
 setParam
@@ -777,27 +777,21 @@
 eters);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 @Overrid
@@ -793,20 +793,17 @@
 erride %0A
-    
+%09
 public v
@@ -853,24 +853,18 @@
 ters) %7B%0A
-        
+%09%09
 currency
@@ -920,24 +920,18 @@
 alue();%0A
-        
+%09%09
 currency
@@ -983,24 +983,18 @@
 alue();%0A
-        
+%09%09
 amount =
@@ -1038,24 +1038,18 @@
 lue();%0A%0A
-        
+%09%09
 fulfillm
@@ -1084,24 +1084,18 @@
 rsion%22;%0A
-        
+%09%09
 String b
@@ -1138,24 +1138,18 @@
 ch?q=%22;%0A
-        
+%09%09
 String e
@@ -1242,24 +1242,18 @@
 cyTo); %0A
-        
+%09%09
 redirect
@@ -1273,27 +1273,21 @@
 endURL;%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 @Overrid
@@ -1280,36 +1280,33 @@
 %0A%09%7D%0A%0A%09@Override%0A
-    
+%09
 public String ge
@@ -1313,32 +1313,26 @@
 tOutput() %7B%0A
-        
+%09%09
 return fulfi
@@ -1339,27 +1339,21 @@
 llment;%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 @Overrid
@@ -1346,36 +1346,33 @@
 %0A%09%7D%0A%0A%09@Override%0A
-    
+%09
 public String ge
@@ -1389,36 +1389,30 @@
  %7B%0A%09
-    
+%09
 return 
-null;%0A    %7D%0A%0A    
+display;%0A%09%7D%0A%0A%09
 @Ove
@@ -1417,20 +1417,17 @@
 verride%0A
-    
+%09
 public S
@@ -1452,16 +1452,10 @@
 ) %7B%0A
-        
+%09%09
 retu
@@ -1471,12 +1471,9 @@
 ct;%0A
-    
+%09
 %7D%0A%7D%0A

Update Currency.java