diff --git a/README.md b/README.md index 4d9f4d9..ebedf92 100644 --- a/README.md +++ b/README.md @@ -51,18 +51,22 @@ 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). - + ![GPS Location of Ollie](images/GPSlocationforCIS12.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)? + 1.**public** * Is it a **Class method** or an **object Instance method**, how do you know? + 1.**object Instance method**, It is embedded in the HiddenSecrets Class * What is its **return data-type**? + 1.**void** * Does it require any **arguments** to call it, and if so, how many **parameters** and of what **data-type**? + 1.**1 argument**, *1 parameter of file data type* * 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? + * What is familiar to you? **the try catch is familiar** + * What is not familiar to you? *the catch parameters are not familiar* + * Do the **for** loops make sense, and if so, tell me what you think they do? **I think they make sense. I think they are the responses to be printed that don't fall within the catch statements.** ## PART 4 - Turn in diff --git a/external/metadata-extractor.jar b/external/metadata-extractor.jar index aa8718e..438b4eb 100644 Binary files a/external/metadata-extractor.jar and b/external/metadata-extractor.jar differ diff --git a/images/GPSlocationforCIS12.JPG b/images/GPSlocationforCIS12.JPG new file mode 100644 index 0000000..624337c Binary files /dev/null and b/images/GPSlocationforCIS12.JPG differ diff --git a/src/AccessToMetadata.java b/src/AccessToMetadata.java new file mode 100644 index 0000000..782b76c --- /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..e5225a1 100644 --- a/src/HiddenSecrets.java +++ b/src/HiddenSecrets.java @@ -7,9 +7,10 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; - // PUT YOUR IMPORTS HERE - +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Scanner; public class HiddenSecrets { public static void getHiddenSecrets(File file) { try { @@ -42,5 +43,13 @@ public static void main(String[] args) { // convert that string into A Path type using Paths class, // and call the getHiddenSecrets method to get the file's meta-data // HERE + Scanner pathRequest; + pathRequest = new Scanner(System.in); + System.out.print("Give me a file path: "); + String fileInput = pathRequest.nextLine(); + Path myPath = (Path)Paths.get(fileInput); + getHiddenSecrets(myPath.toFile()); + + } }