From 926c6da11ddc65a9899cdfb7636edfd6c688d78f Mon Sep 17 00:00:00 2001 From: Fennel Kora Date: Sat, 13 Apr 2024 15:58:54 -0400 Subject: [PATCH] initial commit for helper functions to simulate external API responses --- HelperFunctions.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 HelperFunctions.java diff --git a/HelperFunctions.java b/HelperFunctions.java new file mode 100644 index 0000000..c22f5f8 --- /dev/null +++ b/HelperFunctions.java @@ -0,0 +1,20 @@ +//a collection of helper functions to act as responses for otherwise +//external calls in this implementation for demo purposes + +public class HelperFunctions { + public double[] geocodingAPI(String inputAddress) { //simulates converting an input address into lat-long coordinates + double[] coords = new double[2]; + switch (inputAddress) { + case "250 Community College Pkwy SE, Palm Bay, FL 32909": + coords[0] = 27.993699393377653; + coords[1] = -80.63006489971767; + break; + case "3865 N Wickham Rd, Melbourne, FL 32935": + coords[0] = 28.17009584609403; + coords[1] = -80.67083038806463; + break; + } + double[] returnArray = coords; + return returnArray; + } +}