diff --git a/.idea/Java-Assignment-003.iml b/.idea/Java-Assignment-003.iml index 2e64cec..1223671 100644 --- a/.idea/Java-Assignment-003.iml +++ b/.idea/Java-Assignment-003.iml @@ -10,7 +10,7 @@ - + diff --git a/.idea/misc.xml b/.idea/misc.xml index cf9abe6..b95853c 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,3 @@ - diff --git a/README.md b/README.md index 4d9f4d9..63b35d5 100644 --- a/README.md +++ b/README.md @@ -51,18 +51,24 @@ Your assignment is to use Built-In java classes to: 1. Look up the latitude and longitude coordinates in any online map you can find via Google. 1. Screenshot the map and add it into the **images** folder of this project. 1. Last add image markdown below this line to load your map image (Hint: Example image Markdown is just a couple lines above this). +![map frpm coordinates.jpg](images/map%20frpm%20coordinates.jpg) ## PART 3 - Code Scanning and Interpretation * Look at the getHiddenSecrets method and identify the following parts by editing this README.md and providing your answers: * What is the **access modifer** (e.g. public, private, protected)? - * Is it a **Class method** or an **object Instance method**, how do you know? - * What is its **return data-type**? - * Does it require any **arguments** to call it, and if so, how many **parameters** and of what **data-type**? + * **public** + * Is it a **Class method** or an **object Instance method**, how do you know? + * **Class Method because getHiddenSecrets is static** + * *The void type is used to declare that a method does not return a value.* + * **void: it does not return a value** + * Does it require any **arguments** to call it, and if so, how many **parameters** and of what **data-type**? + * **Yes, If seem to call one argument the (File file)** * Scan line by line through the code and try to determine how it works? * What is familiar to you? * What is not familiar to you? * Do the **for** loops make sense, and if so, tell me what you think they do? + * **Nothing feels familiar to me yet, but I am starting to feel a little more comfortable. I did recognize the format specifier's and that they were calling a string, and that there were three different messesage that would be returned if the wrong thing was input ** ## PART 4 - Turn in diff --git a/external/metadata-extractor.jar b/external/metadata-extractor.jar deleted file mode 100644 index aa8718e..0000000 Binary files a/external/metadata-extractor.jar and /dev/null differ diff --git a/images/map frpm coordinates.jpg b/images/map frpm coordinates.jpg new file mode 100644 index 0000000..6ea7ece Binary files /dev/null and b/images/map frpm coordinates.jpg differ diff --git a/src/AccessToMetadata.java b/src/AccessToMetadata.java new file mode 100644 index 0000000..23d8d25 --- /dev/null +++ b/src/AccessToMetadata.java @@ -0,0 +1,4 @@ +import com.drew.metadata.Metadata; +public class AccessToMetadata { + +} diff --git a/src/HiddenSecrets.java b/src/HiddenSecrets.java index 71067b3..dab54ca 100644 --- a/src/HiddenSecrets.java +++ b/src/HiddenSecrets.java @@ -3,12 +3,24 @@ import com.drew.metadata.Directory; import com.drew.metadata.Tag; import com.drew.imaging.ImageMetadataReader; + + +/** + * @author Trevor Hartman + * @author MJ Fracess + * + * @since Version 1.0 + */ +// PUT YOUR IMPORTS HERE import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; +import java.nio.file.Paths; +import java.util.Scanner; +import java.nio.file.Path; import java.io.IOException; -// PUT YOUR IMPORTS HERE + public class HiddenSecrets { public static void getHiddenSecrets(File file) { @@ -38,9 +50,14 @@ public static void getHiddenSecrets(File file) { public static void main(String[] args) { // Put your code to request a file path, + System.out.println("please enter your file path"); // read in a string from System.in, + Scanner read = new Scanner(System.in); // convert that string into A Path type using Paths class, + String filePath = read.nextLine(); + Path path = Paths.get(filePath); // and call the getHiddenSecrets method to get the file's meta-data // HERE + HiddenSecrets.getHiddenSecrets(path.toFile()); } }