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..6aa0de6 100644 --- a/README.md +++ b/README.md @@ -51,19 +51,25 @@ 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). - +! [capture](images/Capture.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: * What is the **access modifer** (e.g. public, private, protected)? + * public * Is it a **Class method** or an **object Instance method**, how do you know? + * it is a class method because of the static designation * What is its **return data-type**? + * void (returns nothing) * Does it require any **arguments** to call it, and if so, how many **parameters** and of what **data-type**? + * yes, 1 of path * Scan line by line through the code and try to determine how it works? * What is familiar to you? + * the scanner import, strings, system out * What is not familiar to you? + * getHiddenSecrets, paths, metadata * Do the **for** loops make sense, and if so, tell me what you think they do? - +I cannot make sense of them, I also cant identify them ## PART 4 - Turn in ### Same as the last 2 Weeks! diff --git a/images/Capture.PNG b/images/Capture.PNG new file mode 100644 index 0000000..6124b6e Binary files /dev/null and b/images/Capture.PNG differ diff --git a/src/HiddenSecrets.java b/src/HiddenSecrets.java index 71067b3..aba73f1 100644 --- a/src/HiddenSecrets.java +++ b/src/HiddenSecrets.java @@ -8,7 +8,9 @@ import java.io.FileNotFoundException; import java.io.IOException; -// PUT YOUR IMPORTS HERE +import java.nio.file.Paths; + import java.util.Scanner; + import java.nio.file.Path; public class HiddenSecrets { public static void getHiddenSecrets(File file) { @@ -37,10 +39,10 @@ public static void getHiddenSecrets(File file) { } public static void main(String[] args) { - // Put your code to request a file path, - // read in a string from System.in, - // convert that string into A Path type using Paths class, - // and call the getHiddenSecrets method to get the file's meta-data - // HERE + Scanner fileYes = new Scanner(System.in); + String hotdog = fileYes.nextLine(); + Path path = Path.of(hotdog); + getHiddenSecrets(path.toFile()); + System.out.println(); } }