diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..51f5037
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+dbconfig.properties
diff --git a/cs-115-jdbc/.idea/dbnavigator.xml b/cs-115-jdbc/.idea/dbnavigator.xml
new file mode 100644
index 0000000..8630698
--- /dev/null
+++ b/cs-115-jdbc/.idea/dbnavigator.xml
@@ -0,0 +1,575 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cs-115-jdbc/.idea/vcs.xml b/cs-115-jdbc/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/cs-115-jdbc/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cs-115-jdbc/cs-115-jdbc.iml b/cs-115-jdbc/cs-115-jdbc.iml
index c90834f..1a18385 100644
--- a/cs-115-jdbc/cs-115-jdbc.iml
+++ b/cs-115-jdbc/cs-115-jdbc.iml
@@ -7,5 +7,14 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cs-115-jdbc/src/Main.java b/cs-115-jdbc/src/Main.java
index f5858db..2a1c80b 100644
--- a/cs-115-jdbc/src/Main.java
+++ b/cs-115-jdbc/src/Main.java
@@ -1,5 +1,29 @@
-public class Main {
- public static void main(String[] args) {
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.Connection;
+import java.util.ResourceBundle;
+public class Main {
+
+ public static void main(String[] args) {
+ getConnection();
+ }
+
+ protected static Connection getConnection() {
+ Connection connection = null;
+
+ try {
+ ResourceBundle reader = ResourceBundle.getBundle("dbconfig");
+ Class.forName(reader.getString("db.driver"));
+ connection = DriverManager.getConnection(reader.getString("db.url"), reader.getString("db.username"), reader.getString("db.password"));
+ return connection;
+ } catch (SQLException exception) {
+ System.out.println("ExceptionMessage: " + exception.getMessage());
+ System.out.println("ErrorCode: " + exception.getErrorCode());
+ return null;
+ } catch (Exception exception) {
+ System.out.println("ExceptionMessage: " + exception.getMessage());
+ return null;
+ }
}
}
\ No newline at end of file