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..b2f3a98 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ 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). - +![img.png](img.png) ## 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: diff --git a/img.png b/img.png new file mode 100644 index 0000000..c5fbbd3 Binary files /dev/null and b/img.png differ diff --git a/src/HiddenSecrets.java b/src/HiddenSecrets.java index 71067b3..26e05c5 100644 --- a/src/HiddenSecrets.java +++ b/src/HiddenSecrets.java @@ -7,6 +7,11 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; +import java.nio.file.Files; +import java.util.Scanner; +import java.nio.file.Paths; +import java.nio.file.Path; +import com.drew.metadata.Metadata; // PUT YOUR IMPORTS HERE @@ -36,11 +41,28 @@ public static void getHiddenSecrets(File file) { } } - public static void main(String[] args) { + public static void main(String[] args) throws IOException { // Put your code to request a file path, + + Scanner wat = new Scanner(System.in); // read in a string from System.in, + //input a Sout line + System.out.println("Type 'images/OllieTheOtter.jpg' :)"); + String idk = wat.nextLine(); // convert that string into A Path type using Paths class, + + //Paths.get(idk,null); + Path who = Paths.get(idk); + + // File why = new File(who); + // File ugh = (File)Files.createFile(who); // and call the getHiddenSecrets method to get the file's meta-data + getHiddenSecrets(who.toFile()); // HERE } } +/** + * + * 40° 46' 37.46" N + * -124° 8' 41.55" W + */