Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/Java-Assignment-003.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file removed external/metadata-extractor.jar
Binary file not shown.
Binary file added images/map frpm coordinates.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/AccessToMetadata.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import com.drew.metadata.Metadata;
public class AccessToMetadata {

}
19 changes: 18 additions & 1 deletion src/HiddenSecrets.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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());
}
}