diff --git a/Darius_Moomivand_Code/DariusM.code-workspace b/Darius_Moomivand_Code/DariusM.code-workspace
new file mode 100644
index 000000000..ac0dad7df
--- /dev/null
+++ b/Darius_Moomivand_Code/DariusM.code-workspace
@@ -0,0 +1,7 @@
+{
+ "folders": [
+ {
+ "path": "Weeks3-4"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/classbasics/Control.class b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/classbasics/Control.class
new file mode 100644
index 000000000..31f2abc52
Binary files /dev/null and b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/classbasics/Control.class differ
diff --git a/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/fizz/FizzBuzz.class b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/fizz/FizzBuzz.class
new file mode 100644
index 000000000..52cd68afb
Binary files /dev/null and b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/fizz/FizzBuzz.class differ
diff --git a/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/oopbasics/CherryPie.class b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/oopbasics/CherryPie.class
new file mode 100644
index 000000000..913b52bb5
Binary files /dev/null and b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/oopbasics/CherryPie.class differ
diff --git a/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/oopbasics/Crust.class b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/oopbasics/Crust.class
new file mode 100644
index 000000000..05ebe291c
Binary files /dev/null and b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/oopbasics/Crust.class differ
diff --git a/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/oopbasics/Pie.class b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/oopbasics/Pie.class
new file mode 100644
index 000000000..4dab74956
Binary files /dev/null and b/Darius_Moomivand_Code/JavaFundamentals/bin/com/revature/oopbasics/Pie.class differ
diff --git a/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/classbasics/Control.java b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/classbasics/Control.java
new file mode 100644
index 000000000..c2538cf1b
--- /dev/null
+++ b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/classbasics/Control.java
@@ -0,0 +1,46 @@
+package com.revature.classbasics;
+
+public class Control {
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ int x = 10;
+ int [] arr = { 8, 7, 6, 5, 4, 3, 2, 1};
+ boolean y = true;
+
+ do {
+ for(int i = 0; i < x; i++) {
+ x--;
+ System.out.println(x);
+ }
+ }while (x > 0);
+
+ while(y == true) {
+ for(int i : arr) {
+ if(i == 5) {
+ System.out.println(" WE GOT A FIVE!!!");
+ } else if(i == 4) {
+ System.out.println("WE GOT A FOUR!!");
+ y = false;
+ } else {
+ System.out.println(i);
+ }
+ }
+
+ }
+
+ int z = 3;
+ String name = "c";
+
+ // onlystrings char int short byte enums can be used
+ switch(z){
+ case 1: name = "Keth";
+ break;
+ case 2: name = "John";
+ break;
+ case 3: name = "Amy";
+ break;
+ }
+
+ System.out.print(name);
+ }
+}
diff --git a/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/fizz/FizzBuzz.java b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/fizz/FizzBuzz.java
new file mode 100644
index 000000000..98d7ec247
--- /dev/null
+++ b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/fizz/FizzBuzz.java
@@ -0,0 +1,31 @@
+package com.revature.fizz;
+
+public class FizzBuzz {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ /* Scanner sc = new Scanner(System.in);
+ int temp = 0;
+ temp = sc.nextInt();
+ */
+
+ // access first element of string
+ String num = args[0];
+
+ //parse String into int. An example of boxing
+ int n = Integer.parseInt(num);
+
+ for(int i = 1; i <= n; i++) {
+ if(i % 3 == 0) {
+ System.out.println("Fizz");
+ } else if(i % 5 == 0) {
+ System.out.println("Buzz");
+ } else if(i % 15 == 0){
+ System.out.println("FizzBuzz");
+ } else {
+ System.out.println(i);
+ }
+ }
+
+ }
+}
diff --git a/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/oopbasics/CherryPie.java b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/oopbasics/CherryPie.java
new file mode 100644
index 000000000..2ded59324
--- /dev/null
+++ b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/oopbasics/CherryPie.java
@@ -0,0 +1,20 @@
+package com.revature.oopbasics;
+
+public class CherryPie extends Pie implements Crust {
+ CherryPie(){
+ temp = "cold";
+ filling = "cherry";
+ crust = "crunchy";
+ }
+
+ public void typeCrust(){
+ System.out.println("This type of crust is " + crust);
+ }
+
+ public void serve() {
+ System.out.println("You have a slice of pie!");
+ slicesLeft--;
+ System.out.println("There are " + slicesLeft + " slices of pie left!" );
+ }
+
+}
diff --git a/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/oopbasics/Crust.java b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/oopbasics/Crust.java
new file mode 100644
index 000000000..dbf39ea56
--- /dev/null
+++ b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/oopbasics/Crust.java
@@ -0,0 +1,5 @@
+package com.revature.oopbasics;
+
+public interface Crust {
+ public void typeCrust();
+}
diff --git a/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/oopbasics/Pie.java b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/oopbasics/Pie.java
new file mode 100644
index 000000000..276cb8f61
--- /dev/null
+++ b/Darius_Moomivand_Code/JavaFundamentals/src/com/revature/oopbasics/Pie.java
@@ -0,0 +1,18 @@
+package com.revature.oopbasics;
+
+public abstract class Pie {
+ int slicesLeft = 8;
+ String temp;
+ String filling;
+ String crust;
+
+ public abstract void serve();
+
+ public static void main(String[] args) {
+ CherryPie myPie = new CherryPie();
+ myPie.typeCrust();
+ myPie.serve();
+ myPie.serve();
+
+ }
+}
diff --git a/Darius_Moomivand_Code/README.md b/Darius_Moomivand_Code/README.md
new file mode 100644
index 000000000..2bb5abd1e
--- /dev/null
+++ b/Darius_Moomivand_Code/README.md
@@ -0,0 +1,6 @@
+Darius_Moomivand_Code
+
+
+The location of the majority of my Homework is:
+
+1807Jul30Java/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/
diff --git a/Darius_Moomivand_Code/VSC/JS/coreconcepts.js b/Darius_Moomivand_Code/VSC/JS/coreconcepts.js
new file mode 100644
index 000000000..1b797e1b1
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/JS/coreconcepts.js
@@ -0,0 +1,66 @@
+/*
+* Darius M $ 14Aug2018
+* Core Concepts
+*/
+
+/*
+JavaScript is a scripting language for client side operations ( though there are frameworks that enable server-side JS
+- loosely typed -- variable types are dynamically allocated
+-declare variables with var, let, const
+- supports prototypal inheritance
+-important related concepts: var types, scopes, type coercion, hoisting, semicolon injection, anonymous functions,
+ template literals, callback functions, IIFE, arrow notation...)
+*/
+
+function truthyFalsy(cond){
+ if(cond){console.log(
+ "condition is truthy");}
+
+ else{ console.log("condition is falsy");}}
+
+/* -- Type Corecion
+As a loosely typed programming lang that is interpreted and not compiled, JS has to accomodate funcions that operate on variables of different types.
+JS uses type corercion in order to do so
+Falsy - 0, NaN, null, undefined, '', false
+ def: anything that defines to a false.
+Truthy - everything else
+
+When comparing variables/literals we can use the == or === operators
+== forces type coercion, === prevents it.3
+
+
+Object
+
+
+*/
+
+var obj = {
+ name: 'Darius',
+ age: 55,
+ saysHi: function(){
+ console.log(this.name + ' says hi!');
+ }
+
+}
+
+
+
+//how to access object properties
+obj.name
+obj["name"]
+
+//delete properties
+delete obj.name
+
+// This is a guard. First operator acts as a "guard" for the function. Must be true to see second operand.
+function guard(op1, op2){
+ return op1 && op
+;}
+
+// This function put emphasis on the first operand. If first one is falsey, then returns second. If truthy, returns first operand.
+function defaultOp(op1, op2) { return op1 || op2; }
+
+
+var currentSesion =null;
+var userInfo = { username: "goods", password: 123};
+var getuser = currSession && userInfo;
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/VSC/bank.json b/Darius_Moomivand_Code/VSC/bank.json
new file mode 100644
index 000000000..5f3f3b477
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/bank.json
@@ -0,0 +1,32 @@
+{
+ "users": [
+ {
+ "id": 1,
+ "firstName": "Genesis",
+ "lastName": "Bonds",
+ "username": "gb",
+ "password": "123"
+ },
+ {
+ "id": 2,
+ "firstName": "test",
+ "lastName": "test",
+ "username": "test",
+ "password": "test"
+ },
+ {
+ "firstName": "",
+ "lastName": "",
+ "username": "",
+ "password": "",
+ "id": 3
+ }
+ ],
+ "accounts": [
+ {
+ "id": 1,
+ "balance": 1000,
+ "owner": 1
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/VSC/bankApp.html b/Darius_Moomivand_Code/VSC/bankApp.html
new file mode 100644
index 000000000..2b641b210
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/bankApp.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+ Bank
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Don't have an account? Register here...
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Darius_Moomivand_Code/VSC/bankApp.js b/Darius_Moomivand_Code/VSC/bankApp.js
new file mode 100644
index 000000000..11150ce0b
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/bankApp.js
@@ -0,0 +1,123 @@
+window.onload = function(){
+ $('#logIn').on('click', logIn);
+ $('#showRegView').on('click', showRegisterView);
+}
+
+function showRegisterView(){
+ console.log("make new user");
+ $('#logIn').detach();
+ $('#firstname').removeAttr('hidden');
+ $('#lastname').removeAttr('hidden');
+ $('#register').removeAttr('hidden');
+ $('#showRegView').attr('hidden', 'true');
+ $('#register').on('click', register);
+ $('#username').on('blur', validateUsername);
+}
+
+function validateUsername(){
+ console.log("BLURRED!");
+ let username = $('#username').val();
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function(){
+ if(xhr.readyState == 4 && xhr.status == 200){
+ var arr = JSON.parse(xhr.responseText);
+ if(arr.length==1){
+ var elem = $('#message');
+ elem.removeAttr("hidden");
+ elem.html("Sorry, you have an invalid username");
+ }
+ else{
+ $('#message').attr('hidden', 'true');
+ }
+ }
+ }
+
+ xhr.open("GET",
+ `http://localhost:3000/users?username=${username.toLowerCase()}`, true);
+ xhr.send();
+}
+
+function register(){
+ //add new user
+ let uname = $('#username').val();
+ let pw = $('#password').val();
+ let fn = $('#firstname').val();
+ let ln = $('#lastname').val();
+ let user = {
+ firstName: fn,
+ lastName: ln,
+ username: uname,
+ password: pw
+ };
+
+ let reqBody = JSON.stringify(user);
+
+ let xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function(){
+ if(xhr.readyState == 4 && xhr.status==201){
+ let user = JSON.parse(xhr.responseText);
+ $('#landingView').attr('hidden', 'true');
+ $('#homeView').removeAttr('hidden');
+ $('#greeting').html(`Welcome ${user.firstName}`);
+ }
+
+ }
+ xhr.open("POST", "http://localhost:3000/users", true);
+ xhr.setRequestHeader("Content-type", "application/json");
+ xhr.send(reqBody);
+
+}
+
+function logIn(){
+ //Log in function
+ let username = $('#username').val();
+ let password = $('#password').val();
+ if(username.length>0 && password.length>0){
+ //send ajax request to get user by username
+ $('#message').attr('hidden', 'true');
+
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function(){
+ if(xhr.readyState == 4 && xhr.status == 200){
+ var arr = JSON.parse(xhr.responseText);
+ if(arr.length==1){
+ //got back user
+ let user = arr[0];
+ if(user.password == password){
+ //successfully logged in
+ $('#message').attr('hidden', 'true');
+ console.log("logged in");
+ $('#landingView').attr('hidden', 'true');
+ $('#homeView').removeAttr('hidden');
+ $('#greeting').html(`Welcome ${user.firstName}`);
+ }
+ else{
+ var elem = $('#message');
+ elem.removeAttr("hidden");
+ elem.html("Invalid Credentials");
+ }
+
+ }
+ else{
+ //do not have user by username OR there is more than 1
+ //which is also bad
+ var elem = $('#message');
+ elem.removeAttr("hidden");
+ elem.html("Sorry, you have an invalid username");
+ }
+ }
+ }
+
+ xhr.open("GET",
+ `http://localhost:3000/users?username=${username.toLowerCase()}`, true);
+ xhr.send();
+
+ }
+ else{
+ //tell user to not attempt to submit empty fields
+ var elem = $('#message');
+ elem.removeAttr("hidden");
+ elem.html("Please fill out all form fields!");
+ //innerHTML = text is vanilla JS. html(text) is jQuery
+ }
+}
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/VSC/bookstore.html b/Darius_Moomivand_Code/VSC/bookstore.html
new file mode 100644
index 000000000..dd2fda4a9
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/bookstore.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+ Bookstore DOM Manipulation
+
+
+
+
+
+
+
+
+
+
+
+
+
Enter Book Information Info:
+
+
+
+
+
+
+
+
+
+
+
ID
+
ISBN
+
Title
+
Price
+
Genre
+
+
+
+
+
1
+
123456789
+
The Illiad
+
100.00
+
Classic
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/VSC/bookstore.js b/Darius_Moomivand_Code/VSC/bookstore.js
new file mode 100644
index 000000000..2c7b7fbb0
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/bookstore.js
@@ -0,0 +1,51 @@
+window.onload = function(){
+ loadGenres();
+ document.getElementById("addBook").addEventListener("click", addBook);
+}
+
+function loadGenres(){
+ var genres=["Cooking", "Fiction", "History", "Non-Fiction"];
+ for(let i = 0; i < genres.length; i++){
+ var element = document.createElement("option");
+ element.value = genres[i];
+ element.innerHTML = genres[i];
+ document.getElementById("genres").appendChild(element);
+ }
+}
+var count = 1;
+
+function addBook(){
+ //get input values
+ var isbn = document.getElementById("isbn").value;
+ var title = document.getElementById("title").value;
+ var price = document.getElementById("price").value;
+ var el= document.getElementById("genres");
+ var genre = el.options[el.selectedIndex].value;
+ var id = ++count;
+
+ //generate new DOM elements
+ var row = document.createElement("tr");
+ var cell1 = document.createElement("td");
+ var cell2 = document.createElement("td");
+ var cell3 = document.createElement("td");
+ var cell4 = document.createElement("td");
+ var cell5 = document.createElement("td");
+
+ //assign our cells appropriate data
+ cell1.innerHTML = id; //
id
+ cell2.innerHTML = isbn;
+ cell3.innerHTML = title;
+ cell4.innerHTML = price;
+ cell5.innerHTML = genre;
+
+ //append elements to DOM
+ row.appendChild(cell1);
+ row.appendChild(cell2);
+ row.appendChild(cell3);
+ row.appendChild(cell4);
+ row.appendChild(cell5);
+
+ document.getElementById("booksTable").appendChild(row);
+
+
+}
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/VSC/bootstrap.html b/Darius_Moomivand_Code/VSC/bootstrap.html
new file mode 100644
index 000000000..857c405d8
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/bootstrap.html
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+ Exploring Bootstrap
+
+
+
+
+
+
+
+
+
+
+
+
+
BootStrap
+
+
+ Build responsive, mobile-first projects on the web with the world's most popular front-end component library.
+
+ Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with our Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful plugins built on jQuery.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/VSC/htmlHW/jshw.js b/Darius_Moomivand_Code/VSC/htmlHW/jshw.js
new file mode 100644
index 000000000..d63d83639
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/htmlHW/jshw.js
@@ -0,0 +1,26 @@
+window.onload = function(){
+ $('#mybutton').on("click",fib);
+
+
+
+
+
+ function fib(){
+ let num = $("#fib").val();
+
+ var a =1;
+ var b =0;
+ var temp;
+
+ console.log(num);
+ while (num >= 0){
+ temp = a;
+ a = a + b;
+ b = temp;
+ num--;
+ }
+
+ console.log(b);
+ }
+
+}
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/VSC/style.html b/Darius_Moomivand_Code/VSC/style.html
new file mode 100644
index 000000000..585026e11
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/style.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+ Document
+
+
+
+
Exploring CSS3
+
+
+
ONE
+
TWO
+
THREE
+
FOUR
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/VSC/swAJAX.html b/Darius_Moomivand_Code/VSC/swAJAX.html
new file mode 100644
index 000000000..232a2e451
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/swAJAX.html
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+ AJAX 101
+
+
+
+
+
+
+
+
+
AJAX: Asynchronous JavaScript And XML
+
About AJAX
+
+
NOT a programming language! It is a series of interactions between
+ JavaScript, the HTML DOM, and the XMLHttpRequest object from the browser
+
+
It is "asynchronous" because AJAX can exchange information with a
+ server "behind the scenes" -- meaning, there is no need to reload
+ the page in order to display the content received from the response
+
+
Requests will not have to wait for a response from a prior request
+ in order to be sent
+
+
+
About the XMLHttpRequest object
+
+
Supported by most modern browsers *cough* dont use IE *cough*
+
Used to exchange data with a server
+
+
+ var xhr = new XMLHttpRequest();
+
+
+
The object has various methods and properties
+
+ Important Methods
+
+
+ new XMLHttpRequest() --> creates new object
+
+ abort() --> cancels the current request
+
+ getAllResponseHeaders() &
+ getResponseHeader() --> get response metadata
+ setRequestHeader()--> set name/value pair in request header
+
+
+
+ Important Properties:
+
+
onreadystatechange - defines a function to be executed whwen the ready state property changes
+
readyState - holds the XHR status
+
+
0 - request not initialized
+
1 - server connection established
+
2 - request received
+
3 - server is processing request
+
4 - response is ready
+
+
+
responseText - response body as string
+
responseXML - response body as XML
+
status - HTTP response code (200)
+
statusText - HTTP response text (OK)
+
+
+
+
+
AJAX Workflow
+
+
create XMLHttpRequest object
+
define onreadystatechange function
+
open request
+
send request
+
+
If we have more than one AJAX task on a page, define one function for executing XHR and one function to handle each
+ of the tasks and pass to the xhr function as a callback
+
+
+
+
STAR WARS
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/VSC/swAJAX.js b/Darius_Moomivand_Code/VSC/swAJAX.js
new file mode 100644
index 000000000..81bce0fcb
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/swAJAX.js
@@ -0,0 +1,33 @@
+window.onload =function(){
+ $('#getInfo').on("click", doAJAX);
+
+}
+function doAJAX(){
+ var id = $('#swID').val();
+
+ //AJAX!!!!!
+ //STEP 1 - create new XHR
+ var xhr = new XMLHttpRequest();
+
+ //STEP 2 - ddefine callback function
+ xhr.onreadystatechange = function(){
+ console.log(xhr.readyState);
+ if(xhr.readyState == 4 && xhr.status == 200 ){
+ //DEFINE FUNCTIONALITY FOR RESPONSE
+ resp = xhr.responseText;
+ swPerson = JSON.parse(resp);
+ console.log(swPerson);
+
+ }
+ }
+
+
+ var url = `https://swapi.co/api/people/${id}/`;
+ xhr.open("GET", url, true);
+
+ xhr.send();
+}
+
+function returnInfo(){
+
+}
diff --git a/Darius_Moomivand_Code/VSC/tester.html b/Darius_Moomivand_Code/VSC/tester.html
new file mode 100644
index 000000000..682a5f978
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/tester.html
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+ Tester
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Week1/docs/recursion.md b/Darius_Moomivand_Code/VSC/text.js
similarity index 100%
rename from Week1/docs/recursion.md
rename to Darius_Moomivand_Code/VSC/text.js
diff --git a/Darius_Moomivand_Code/VSC/todojQuery.html b/Darius_Moomivand_Code/VSC/todojQuery.html
new file mode 100644
index 000000000..f0512ea61
--- /dev/null
+++ b/Darius_Moomivand_Code/VSC/todojQuery.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+ GroveryList
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
To Buy:
+
+
wine
+
steak
+
grapes
+
+
+
+
Purchased:
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week1/Controls.java b/Darius_Moomivand_Code/Week1/Controls.java
new file mode 100644
index 000000000..3937ca730
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/Controls.java
@@ -0,0 +1,52 @@
+package com.revature.classbasics;
+
+public class Controls {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ int x = 10;
+ int [] arr = { 8, 7, 6, 5, 4, 3, 2, 1};
+ boolean y = true;
+
+ do {
+ for(int i = 0; i < x; i++) {
+ x--;
+ System.out.println(x);
+ }
+ }while (x > 0);
+
+ while(y == true) {
+ for(int i : arr) {
+ if(i == 5) {
+ System.out.println(" WE GOT A FIVE!!!");
+ } else if(i == 4) {
+ System.out.println("WE GOT A FOUR!!");
+ y = false;
+ } else {
+ System.out.println(i);
+ }
+ }
+
+ }
+
+ int z = 3;
+ String name = "c";
+
+ // onlystrings char int short byte enums can be used
+ switch(z){
+ case 1: name = "Keth";
+ break;
+ case 2: name = "John";
+ break;
+ case 3: name = "Amy";
+ break;
+ }
+
+ System.out.print(name);
+
+
+
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/FizzBuzz.java b/Darius_Moomivand_Code/Week1/FizzBuzz.java
new file mode 100644
index 000000000..eb486d7b8
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/FizzBuzz.java
@@ -0,0 +1,34 @@
+package Fizzy;
+
+import java.util.Scanner;
+
+public class FizzBuzz {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ /* Scanner sc = new Scanner(System.in);
+ int temp = 0;
+ temp = sc.nextInt();
+ */
+
+ // access first element of string
+ String num = args[0];
+
+ //parse String into int. An example of boxing
+ int n = Integer.parseInt(num);
+
+ for(int i = 1; i <= n; i++) {
+ if(i % 3 == 0) {
+ System.out.println("Fizz");
+ } else if(i % 5 == 0) {
+ System.out.println("Buzz");
+ } else if(i % 15 == 0){
+ System.out.println("FizzBuzz");
+ } else {
+ System.out.println(i);
+ }
+ }
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/classbasics/Control.java b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/classbasics/Control.java
new file mode 100644
index 000000000..c2538cf1b
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/classbasics/Control.java
@@ -0,0 +1,46 @@
+package com.revature.classbasics;
+
+public class Control {
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ int x = 10;
+ int [] arr = { 8, 7, 6, 5, 4, 3, 2, 1};
+ boolean y = true;
+
+ do {
+ for(int i = 0; i < x; i++) {
+ x--;
+ System.out.println(x);
+ }
+ }while (x > 0);
+
+ while(y == true) {
+ for(int i : arr) {
+ if(i == 5) {
+ System.out.println(" WE GOT A FIVE!!!");
+ } else if(i == 4) {
+ System.out.println("WE GOT A FOUR!!");
+ y = false;
+ } else {
+ System.out.println(i);
+ }
+ }
+
+ }
+
+ int z = 3;
+ String name = "c";
+
+ // onlystrings char int short byte enums can be used
+ switch(z){
+ case 1: name = "Keth";
+ break;
+ case 2: name = "John";
+ break;
+ case 3: name = "Amy";
+ break;
+ }
+
+ System.out.print(name);
+ }
+}
diff --git a/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/fizz/FizzBuzz.java b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/fizz/FizzBuzz.java
new file mode 100644
index 000000000..98d7ec247
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/fizz/FizzBuzz.java
@@ -0,0 +1,31 @@
+package com.revature.fizz;
+
+public class FizzBuzz {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ /* Scanner sc = new Scanner(System.in);
+ int temp = 0;
+ temp = sc.nextInt();
+ */
+
+ // access first element of string
+ String num = args[0];
+
+ //parse String into int. An example of boxing
+ int n = Integer.parseInt(num);
+
+ for(int i = 1; i <= n; i++) {
+ if(i % 3 == 0) {
+ System.out.println("Fizz");
+ } else if(i % 5 == 0) {
+ System.out.println("Buzz");
+ } else if(i % 15 == 0){
+ System.out.println("FizzBuzz");
+ } else {
+ System.out.println(i);
+ }
+ }
+
+ }
+}
diff --git a/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/oopbasics/CherryPie.java b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/oopbasics/CherryPie.java
new file mode 100644
index 000000000..2ded59324
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/oopbasics/CherryPie.java
@@ -0,0 +1,20 @@
+package com.revature.oopbasics;
+
+public class CherryPie extends Pie implements Crust {
+ CherryPie(){
+ temp = "cold";
+ filling = "cherry";
+ crust = "crunchy";
+ }
+
+ public void typeCrust(){
+ System.out.println("This type of crust is " + crust);
+ }
+
+ public void serve() {
+ System.out.println("You have a slice of pie!");
+ slicesLeft--;
+ System.out.println("There are " + slicesLeft + " slices of pie left!" );
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/oopbasics/Crust.java b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/oopbasics/Crust.java
new file mode 100644
index 000000000..dbf39ea56
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/oopbasics/Crust.java
@@ -0,0 +1,5 @@
+package com.revature.oopbasics;
+
+public interface Crust {
+ public void typeCrust();
+}
diff --git a/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/oopbasics/Pie.java b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/oopbasics/Pie.java
new file mode 100644
index 000000000..276cb8f61
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/JavaFundamentals/src/com/revature/oopbasics/Pie.java
@@ -0,0 +1,18 @@
+package com.revature.oopbasics;
+
+public abstract class Pie {
+ int slicesLeft = 8;
+ String temp;
+ String filling;
+ String crust;
+
+ public abstract void serve();
+
+ public static void main(String[] args) {
+ CherryPie myPie = new CherryPie();
+ myPie.typeCrust();
+ myPie.serve();
+ myPie.serve();
+
+ }
+}
diff --git a/Week1/Core Java HW.pdf b/Darius_Moomivand_Code/Week1/Week1_More/Core Java HW.pdf
similarity index 100%
rename from Week1/Core Java HW.pdf
rename to Darius_Moomivand_Code/Week1/Week1_More/Core Java HW.pdf
diff --git a/Week1/TEST.txt b/Darius_Moomivand_Code/Week1/Week1_More/TEST.txt
similarity index 100%
rename from Week1/TEST.txt
rename to Darius_Moomivand_Code/Week1/Week1_More/TEST.txt
diff --git a/Week1/docs/README.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/README.md
similarity index 100%
rename from Week1/docs/README.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/README.md
diff --git a/Week1/docs/abstraction-and-polymorphism.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/abstraction-and-polymorphism.md
similarity index 100%
rename from Week1/docs/abstraction-and-polymorphism.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/abstraction-and-polymorphism.md
diff --git a/Week1/docs/arrays.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/arrays.md
similarity index 100%
rename from Week1/docs/arrays.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/arrays.md
diff --git a/Week1/docs/autoboxing.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/autoboxing.md
similarity index 100%
rename from Week1/docs/autoboxing.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/autoboxing.md
diff --git a/Week1/docs/build-artifacts.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/build-artifacts.md
similarity index 100%
rename from Week1/docs/build-artifacts.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/build-artifacts.md
diff --git a/Week1/docs/casting.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/casting.md
similarity index 100%
rename from Week1/docs/casting.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/casting.md
diff --git a/Week1/docs/classes-and-objects.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/classes-and-objects.md
similarity index 100%
rename from Week1/docs/classes-and-objects.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/classes-and-objects.md
diff --git a/Week1/docs/collections.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/collections.md
similarity index 100%
rename from Week1/docs/collections.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/collections.md
diff --git a/Week1/docs/comparable-and-comparator.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/comparable-and-comparator.md
similarity index 100%
rename from Week1/docs/comparable-and-comparator.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/comparable-and-comparator.md
diff --git a/Week1/docs/control-statements.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/control-statements.md
similarity index 100%
rename from Week1/docs/control-statements.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/control-statements.md
diff --git a/Week1/docs/debug.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/debug.md
similarity index 100%
rename from Week1/docs/debug.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/debug.md
diff --git a/Week1/docs/encapsulation.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/encapsulation.md
similarity index 100%
rename from Week1/docs/encapsulation.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/encapsulation.md
diff --git a/Week1/docs/exceptions.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/exceptions.md
similarity index 100%
rename from Week1/docs/exceptions.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/exceptions.md
diff --git a/Week1/docs/favor-composition-over-inheritance.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/favor-composition-over-inheritance.md
similarity index 100%
rename from Week1/docs/favor-composition-over-inheritance.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/favor-composition-over-inheritance.md
diff --git a/Week1/docs/fileio.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/fileio.md
similarity index 100%
rename from Week1/docs/fileio.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/fileio.md
diff --git a/Week1/docs/final.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/final.md
similarity index 100%
rename from Week1/docs/final.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/final.md
diff --git a/Week1/docs/generics.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/generics.md
similarity index 100%
rename from Week1/docs/generics.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/generics.md
diff --git a/Week1/docs/images/collections.jpg b/Darius_Moomivand_Code/Week1/Week1_More/docs/images/collections.jpg
similarity index 100%
rename from Week1/docs/images/collections.jpg
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/images/collections.jpg
diff --git a/Week1/docs/inheritance.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/inheritance.md
similarity index 100%
rename from Week1/docs/inheritance.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/inheritance.md
diff --git a/Week1/docs/interfaces.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/interfaces.md
similarity index 100%
rename from Week1/docs/interfaces.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/interfaces.md
diff --git a/Week1/docs/junit.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/junit.md
similarity index 100%
rename from Week1/docs/junit.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/junit.md
diff --git a/Week1/docs/logging.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/logging.md
similarity index 100%
rename from Week1/docs/logging.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/logging.md
diff --git a/Week1/docs/maven.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/maven.md
similarity index 100%
rename from Week1/docs/maven.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/maven.md
diff --git a/Week1/docs/object-class.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/object-class.md
similarity index 100%
rename from Week1/docs/object-class.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/object-class.md
diff --git a/Week1/docs/operators.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/operators.md
similarity index 100%
rename from Week1/docs/operators.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/operators.md
diff --git a/Week1/docs/package-import.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/package-import.md
similarity index 100%
rename from Week1/docs/package-import.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/package-import.md
diff --git a/Week1/docs/primitives.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/primitives.md
similarity index 100%
rename from Week1/docs/primitives.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/primitives.md
diff --git a/Week1/java-examples/JavaFundamentals/test.txt b/Darius_Moomivand_Code/Week1/Week1_More/docs/recursion.md
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/test.txt
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/recursion.md
diff --git a/Week1/docs/reflection.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/reflection.md
similarity index 100%
rename from Week1/docs/reflection.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/reflection.md
diff --git a/Week1/docs/scanner.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/scanner.md
similarity index 100%
rename from Week1/docs/scanner.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/scanner.md
diff --git a/Week1/docs/stack-vs-heap.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/stack-vs-heap.md
similarity index 100%
rename from Week1/docs/stack-vs-heap.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/stack-vs-heap.md
diff --git a/Week1/docs/static-class.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/static-class.md
similarity index 100%
rename from Week1/docs/static-class.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/static-class.md
diff --git a/Week1/docs/string-parsing.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/string-parsing.md
similarity index 100%
rename from Week1/docs/string-parsing.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/string-parsing.md
diff --git a/Week1/docs/strings.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/strings.md
similarity index 100%
rename from Week1/docs/strings.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/strings.md
diff --git a/Week1/docs/threads.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/threads.md
similarity index 100%
rename from Week1/docs/threads.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/threads.md
diff --git a/Week1/docs/variable-scopes.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/variable-scopes.md
similarity index 100%
rename from Week1/docs/variable-scopes.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/variable-scopes.md
diff --git a/Week1/docs/why-java.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/why-java.md
similarity index 100%
rename from Week1/docs/why-java.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/why-java.md
diff --git a/Week1/docs/wrapper-classes.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/wrapper-classes.md
similarity index 100%
rename from Week1/docs/wrapper-classes.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/wrapper-classes.md
diff --git a/Week1/docs/xml.md b/Darius_Moomivand_Code/Week1/Week1_More/docs/xml.md
similarity index 100%
rename from Week1/docs/xml.md
rename to Darius_Moomivand_Code/Week1/Week1_More/docs/xml.md
diff --git a/Week1/java-examples/.gitignore b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/.gitignore
similarity index 100%
rename from Week1/java-examples/.gitignore
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/.gitignore
diff --git a/Week1/java-examples/JavaFundamentals/src/GCTest.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/GCTest.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/GCTest.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/GCTest.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/Constructors.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/Constructors.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/Constructors.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/Constructors.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/ControlStatements.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/ControlStatements.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/ControlStatements.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/ControlStatements.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/Operators.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/Operators.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/Operators.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/Operators.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/Scopes.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/Scopes.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/Scopes.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/Scopes.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/StaticStuff.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/StaticStuff.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/classbasics/StaticStuff.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/classbasics/StaticStuff.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/collections/ListExample.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/ListExample.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/collections/ListExample.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/ListExample.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/collections/MapExample.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/MapExample.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/collections/MapExample.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/MapExample.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/collections/QueueExample.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/QueueExample.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/collections/QueueExample.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/QueueExample.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/collections/SetExample.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/SetExample.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/collections/SetExample.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/SetExample.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/collections/UnderstandingCollections.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/UnderstandingCollections.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/collections/UnderstandingCollections.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/collections/UnderstandingCollections.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Calendar.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Calendar.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Calendar.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Calendar.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Days.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Days.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Days.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Days.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Operations.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Operations.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Operations.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Operations.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Primitives.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Primitives.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Primitives.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Primitives.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Testing.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Testing.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Testing.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Testing.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/UnderstandingArrays.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/UnderstandingArrays.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/UnderstandingArrays.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/UnderstandingArrays.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/UnderstandingStrings.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/UnderstandingStrings.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/UnderstandingStrings.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/UnderstandingStrings.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Wrappers.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Wrappers.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/datatypes/Wrappers.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/datatypes/Wrappers.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Driver.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Driver.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Driver.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Driver.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Hammer.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Hammer.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Hammer.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Hammer.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/LazySingleton.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/LazySingleton.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/LazySingleton.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/LazySingleton.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Screwdriver.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Screwdriver.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Screwdriver.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Screwdriver.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Singleton.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Singleton.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Singleton.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Singleton.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Tool.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Tool.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Tool.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Tool.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/ToolFactory.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/ToolFactory.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/ToolFactory.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/ToolFactory.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Wrench.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Wrench.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/designpatterns/Wrench.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/designpatterns/Wrench.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/exceptions/MyException.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exceptions/MyException.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/exceptions/MyException.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exceptions/MyException.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/exceptions/UnderstandingExceptions.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exceptions/UnderstandingExceptions.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/exceptions/UnderstandingExceptions.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exceptions/UnderstandingExceptions.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/exercises/Beta.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exercises/Beta.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/exercises/Beta.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exercises/Beta.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/exercises/CamelCase.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exercises/CamelCase.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/exercises/CamelCase.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exercises/CamelCase.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/exercises/FizzBuzz.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exercises/FizzBuzz.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/exercises/FizzBuzz.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/exercises/FizzBuzz.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/intro/HelloWorld.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/intro/HelloWorld.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/intro/HelloWorld.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/intro/HelloWorld.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/io/Driver.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/Driver.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/io/Driver.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/Driver.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/io/IODAO.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/IODAO.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/io/IODAO.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/IODAO.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/io/ScannerExample.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/ScannerExample.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/io/ScannerExample.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/ScannerExample.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/io/SerializationExample.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/SerializationExample.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/io/SerializationExample.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/SerializationExample.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/io/Student.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/Student.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/io/Student.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/io/Student.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/oop/Animal.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Animal.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/oop/Animal.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Animal.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/oop/Cat.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Cat.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/oop/Cat.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Cat.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/oop/Dog.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Dog.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/oop/Dog.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Dog.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/oop/Livable.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Livable.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/oop/Livable.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Livable.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/oop/Test.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Test.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/oop/Test.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/oop/Test.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/threads/ExtendsThread.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/threads/ExtendsThread.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/threads/ExtendsThread.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/threads/ExtendsThread.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/threads/ImplementsRunnable.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/threads/ImplementsRunnable.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/threads/ImplementsRunnable.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/threads/ImplementsRunnable.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/threads/Resource.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/threads/Resource.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/threads/Resource.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/threads/Resource.java
diff --git a/Week1/java-examples/JavaFundamentals/src/com/revature/threads/Threads101.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/threads/Threads101.java
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/com/revature/threads/Threads101.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/com/revature/threads/Threads101.java
diff --git a/Week1/java-examples/JavaFundamentals/src/files/serial.txt b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/files/serial.txt
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/files/serial.txt
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/files/serial.txt
diff --git a/Week1/java-examples/JavaFundamentals/src/files/students.txt b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/files/students.txt
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/src/files/students.txt
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/src/files/students.txt
diff --git a/Week1/java-examples/JavaFundamentals/students.txt b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/students.txt
similarity index 100%
rename from Week1/java-examples/JavaFundamentals/students.txt
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/students.txt
diff --git a/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/test.txt b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/JavaFundamentals/test.txt
new file mode 100644
index 000000000..e69de29bb
diff --git a/Week1/java-examples/exercises/FizzBuzz.java b/Darius_Moomivand_Code/Week1/Week1_More/java-examples/exercises/FizzBuzz.java
similarity index 100%
rename from Week1/java-examples/exercises/FizzBuzz.java
rename to Darius_Moomivand_Code/Week1/Week1_More/java-examples/exercises/FizzBuzz.java
diff --git a/Darius_Moomivand_Code/Week1/com.revature.homework/pom.xml b/Darius_Moomivand_Code/Week1/com.revature.homework/pom.xml
new file mode 100644
index 000000000..06e9bd94f
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.homework/pom.xml
@@ -0,0 +1,6 @@
+
+ 4.0.0
+ homework
+ com.revature.homework
+ 0.0.1-SNAPSHOT
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/pom.xml b/Darius_Moomivand_Code/Week1/com.revature.hw/pom.xml
new file mode 100644
index 000000000..4128fbff5
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/pom.xml
@@ -0,0 +1,6 @@
+
+ 4.0.0
+ homework
+ com.revature.hw
+ 0.0.1-SNAPSHOT
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/Calc.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/Calc.java
new file mode 100644
index 000000000..8b53b093c
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/Calc.java
@@ -0,0 +1,37 @@
+//Created by Darius Moomivand @ 05Aug18
+import java.util.Scanner;
+
+public class Calc {
+ static int first = 9;
+ static int second = 20;
+
+ // function that takes enum
+ public static void calculate(Func input) {
+ switch(input) {
+ case ADD: System.out.println(first + second);
+ break;
+ case SUB: System.out.println(second - first);
+ break;
+ case MUL: System.out.println(first * second);
+ break;
+ case DIV: System.out.println(second / first);
+ break;
+
+ }
+ }
+
+ public static void main(String[] args) {
+ System.out.println("Enter one of the following to execute the function: ");
+ System.out.println(" 'add' to add");
+ System.out.println(" 'sub' to subtract");
+ System.out.println(" 'mul' to multiply");
+ System.out.println(" 'div' to divide");
+
+ Scanner sc = new Scanner(System.in);
+ Func temp = Func.valueOf(sc.next().toUpperCase()); // Convert string to enum
+ String y = sc.nextLine();
+
+ Calc.calculate(temp);
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/Func.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/Func.java
new file mode 100644
index 000000000..972abc10e
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/Func.java
@@ -0,0 +1,6 @@
+//Created by Darius Moomivand @ 05Aug18
+
+//Enum used for Calc class to convert a scanner input to a switch input
+public enum Func {
+ ADD, SUB, MUL, DIV
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/findfloats/FindFloats.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/findfloats/FindFloats.java
new file mode 100644
index 000000000..a9aba7b21
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/findfloats/FindFloats.java
@@ -0,0 +1,30 @@
+//Created by Darius Moomivand @ 05Aug18
+package com.revature.findfloats;
+
+//Floats class is located in package com.revature.floats
+import com.revature.floats.Floats;
+
+public class FindFloats {
+ //Method used to find first float
+ public static Float finderA() {
+ Float temp1 = Floats.getOne();
+ return temp1;
+
+ }
+ //Method used to find second float
+ public static Float finderB() {
+ Float temp2 = Floats.getTwo();
+ return temp2;
+
+ }
+
+ public static void main(String[] args) {
+
+ Float floatA = FindFloats.finderA();
+ Float floatB = FindFloats.finderB();
+
+ System.out.println(floatA);
+ System.out.println(floatB);
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/floats/Floats.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/floats/Floats.java
new file mode 100644
index 000000000..a28cd502e
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/floats/Floats.java
@@ -0,0 +1,21 @@
+package com.revature.floats;
+
+public class Floats {
+ static float one = 45.5556F;
+ static float two = 87.3249F;
+
+ public static float getOne() {
+ return one;
+ }
+ public void setOne(float one) {
+ this.one = one;
+ }
+ public static float getTwo() {
+ return two;
+ }
+ public void setTwo(float two) {
+ this.two = two;
+ }
+
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ArrayListManipulation.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ArrayListManipulation.java
new file mode 100644
index 000000000..66d0ccdb9
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ArrayListManipulation.java
@@ -0,0 +1,63 @@
+package com.revature.hw;
+
+import java.util.ArrayList;
+
+public class ArrayListManipulation {
+
+ public static ArrayList fillArray() {
+ ArrayList list = new ArrayList();
+ for(int i = 1; i < 11; i++) {
+ list.add(i);
+ }
+ return list;
+ }
+
+ public static int addThem(ArrayList inbound){
+ int tempInt = 0;
+ for(int i = 0;i < inbound.size(); i++) {
+ if(inbound.get(i) % 2 == 0) {
+ tempInt += inbound.get(i);
+ }
+ }
+
+ return tempInt;
+ }
+
+ public static ArrayList rtPrime(ArrayList list){
+ ArrayList tempList = new ArrayList();
+ int num;
+ Boolean check;
+ for(int i = 2; i < list.size(); i++) {
+ check = true;
+ num = (Integer) list.get(i);
+ for(int j = 2; j < i; j++) {
+ if(num % j == 0) {
+ check = false;
+ break;
+ }
+ }
+ if(check == true && num != 1 && num != 0) {
+ tempList.add(num);
+
+ }
+ }
+ return tempList;
+ }
+
+ public static void main(String[] args) {
+ ArrayList myList1 = new ArrayList();
+ ArrayList myList2 = new ArrayList();
+
+ myList1 = ArrayListManipulation.fillArray();
+ System.out.println(myList1);
+
+ int evenTotal = ArrayListManipulation.addThem(myList1);
+ System.out.println(evenTotal);
+
+ myList2 = ArrayListManipulation.rtPrime(myList1);
+ System.out.println(myList2);
+
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ArrayListOfPalindromes.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ArrayListOfPalindromes.java
new file mode 100644
index 000000000..3dd9dea77
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ArrayListOfPalindromes.java
@@ -0,0 +1,56 @@
+// Created by Darius Moomivand @ 05Aug18
+package com.revature.hw;
+
+import java.awt.List;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+
+public class ArrayListOfPalindromes {
+
+ // Iterates through an ArrayList and checks to see if the object is a palindrome
+ // it adds it to a seperate list
+ public static ArrayList sorter(ArrayList x) {
+ ArrayList tempList = new ArrayList();
+ String one;
+ String two;
+
+ for(String word : x) {
+ StringBuffer buffer = new StringBuffer(word);
+ buffer.reverse();
+ two = buffer.toString();
+ one = (String) word;
+ if(one.matches(two)) {
+ tempList.add(one);
+ }
+ }
+
+ return tempList;
+
+ }
+
+ public static void main(String[] args) {
+ ArrayList list1 = new ArrayList();
+ ArrayList list2 = new ArrayList();
+
+ list1.add("karan");
+ list1.add("madam");
+ list1.add("tom");
+ list1.add("civic");
+ list1.add("radar");
+ list1.add("sexes");
+ list1.add("jimmy");
+ list1.add("kayak");
+ list1.add("john");
+ list1.add("refer");
+ list1.add("billy");
+ list1.add("did");
+
+ System.out.println("This is an unfiltered list: \n" + list1);
+
+ list2 = ArrayListOfPalindromes.sorter(list1);
+ System.out.println("This list contains palindromes: \n" + list2);
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ArrayListPrime.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ArrayListPrime.java
new file mode 100644
index 000000000..1ce8948c8
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ArrayListPrime.java
@@ -0,0 +1,38 @@
+//Created by Darius Moomivand @ 05Aug18
+package com.revature.hw;
+
+import java.util.ArrayList;
+
+public class ArrayListPrime {
+
+ //Method used to find prime numbers in an ArrayList
+ public static void printPrimes(ArrayList temp) {
+ int num;
+ Boolean check;
+ for(int i = 2; i < temp.size(); i++) {
+ check = true;
+ num = (Integer) temp.get(i);
+ for(int j = 2; j < i; j++) {
+ if(num % j == 0) {
+ check = false;
+ break;
+ }
+ }
+ if(check == true && num != 1 && num != 0) {
+ System.out.println(num);
+
+ }
+ }
+ }
+
+ public static void main(String[] args) {
+ ArrayList list = new ArrayList();
+ for(int i = 0; i < 100; i++) {
+ list.add(i);
+ }
+
+ ArrayListPrime.printPrimes(list);
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Concrete.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Concrete.java
new file mode 100644
index 000000000..33e9ec772
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Concrete.java
@@ -0,0 +1,48 @@
+package com.revature.hw;
+
+
+public class Concrete extends ConcreteSuper {
+ Boolean upper = false;
+
+ @Override
+ public Boolean checkUpper(String input) {
+ char character;
+ Boolean upper = false;
+
+ for(int i = 0; i < input.length(); i++) {
+ character = input.charAt(i);
+ if(!Character.isUpperCase(character)) {
+ upper = true;
+ return upper;
+ }
+ }
+ return upper;
+ }
+
+ @Override
+ public String makeUpper(String input) {
+
+ return input.toUpperCase();
+ }
+
+ @Override
+ public int convertString(String input) {
+ int temp = Integer.parseInt(input);
+ temp += 10;
+ return temp;
+ }
+
+
+ public static void main(String[] args) {
+
+ String myString = "MyCheese";
+ String myIntString = "33";
+ Concrete myClass = new Concrete();
+ Boolean truth = myClass.checkUpper(myString);
+ System.out.println(truth);
+ String itsUpper = myClass.makeUpper(myString);
+ System.out.println(itsUpper);
+ int convertedStr = myClass.convertString(myIntString);
+ System.out.println(convertedStr);
+ }
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ConcreteSuper.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ConcreteSuper.java
new file mode 100644
index 000000000..a8911557a
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ConcreteSuper.java
@@ -0,0 +1,8 @@
+package com.revature.hw;
+
+public abstract class ConcreteSuper {
+ public abstract Boolean checkUpper(String string);
+ public abstract String makeUpper(String string);
+ public abstract int convertString(String string);
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Even.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Even.java
new file mode 100644
index 000000000..368ebc0c9
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Even.java
@@ -0,0 +1,21 @@
+//Created by Darius Moomivand @ 04Aug18
+package com.revature.hw;
+
+public class Even {
+ //Method used to check if a given number is even or odd
+ //by using a bitwise operation '&' with 1 and comparing it to 1
+ public static void isEven(int n) {
+ if((n & 1) == 1)
+ System.out.println("This number is odd!");
+ else
+ System.out.println("This number is even!");
+ }
+
+ public static void main(String[] args) {
+ int num = 9;
+ Even.isEven(num);
+
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/EvenLoop.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/EvenLoop.java
new file mode 100644
index 000000000..94902887e
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/EvenLoop.java
@@ -0,0 +1,30 @@
+//Created by Darius Moomivand @ 05Aug18
+package com.revature.hw;
+
+public class EvenLoop {
+ static int[] tempArr = new int[100];
+
+ //Method used to fill an array
+ public static void fill() {
+ for(int i = 0; i < tempArr.length; i++) {
+ tempArr[i] = i+1;
+ }
+ }
+
+ //Method used to print out even numbers
+ public static void printEven() {
+ for(int even: tempArr) {
+ if(even % 2 == 0)
+ System.out.println(even);
+ }
+ }
+
+
+ public static void main(String[] args) {
+ EvenLoop.fill();
+ EvenLoop.printEven();
+
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Factorial.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Factorial.java
new file mode 100644
index 000000000..3cd616161
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Factorial.java
@@ -0,0 +1,19 @@
+// Created by Darius Moomivand @ 04Aug18
+package com.revature.hw;
+
+public class Factorial {
+ //Recursive method used to get the factorial of a number
+ public static int factorNum(int n) {
+ if(n == 0)
+ return 1;
+ else
+ return( n*factorNum(n-1));
+ }
+
+ public static void main(String[] args) {
+ int num = 4;
+ int temp = Factorial.factorNum(num);
+ System.out.println(temp);
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Interest.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Interest.java
new file mode 100644
index 000000000..c386d99b4
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Interest.java
@@ -0,0 +1,37 @@
+//Created by Dariius Moomivand @ 05Aug18;
+package com.revature.hw;
+
+import java.util.Scanner;
+
+public class Interest {
+ static int interest;
+
+ public static void calcIntrest(int a, int b, int c) {
+ interest = a*b*c;
+ System.out.println("The interest rate is: " + interest);
+ }
+
+ public static void main(String[] args) {
+ String temp;
+ int principal;
+ int rate;
+ int time;
+ Scanner sc = new Scanner(System.in);
+
+ System.out.println("Enter the principle: ");
+ temp = sc.nextLine();
+ principal = Integer.parseInt(temp);
+
+ System.out.println("Enter the rate: ");
+ temp = sc.nextLine();
+ rate = Integer.parseInt(temp);
+
+ System.out.println("Enter the time:");
+ temp = sc.nextLine();
+ time = Integer.parseInt(temp);
+
+ Interest.calcIntrest(principal, rate, time);
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Palindrome.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Palindrome.java
new file mode 100644
index 000000000..962af1ed6
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Palindrome.java
@@ -0,0 +1,31 @@
+//Created by Darius Moomivand @ 04Aug18
+package com.revature.hw;
+
+public class Palindrome {
+ //Method used to check if a string is a palindrome
+ public static void pal(String s) {
+ int counter = 0; // counter used to index reverse string
+ Boolean check = true; // boolean used to check
+
+ for(int i = s.length()-1; i > 0; i--) {
+ if(s.charAt(i) != s.charAt(counter)) {
+ System.out.println("Not a palindrome!!!");
+ check = false;
+ break;
+ } else
+ counter++;
+ }
+ if(check)
+ System.out.println("Its a palindrome");
+ }
+
+ public static void main(String[] args) {
+
+ String string = "elephant";
+ Palindrome.pal(string);
+ String string2 = "racecar";
+ Palindrome.pal(string2);
+
+
+ }
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ReadAFile.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ReadAFile.java
new file mode 100644
index 000000000..cc7f54458
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/ReadAFile.java
@@ -0,0 +1,26 @@
+package com.revature.hw;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+
+public class ReadAFile {
+
+ public static void main(String[] args) throws Exception {
+ String tempString;
+ String []splitString;
+ File myFile = new File("C:\\Users\\Darius\\Documents\\temp\\Data.txt");
+
+ BufferedReader br = new BufferedReader(new FileReader(myFile));
+
+ while((tempString = br.readLine()) != null) {
+ splitString = tempString.split(":", 4);
+ System.out.println("Name: " + splitString[0] + " " + splitString[1]);
+ System.out.println("Age: " + splitString[2]);
+ System.out.println("State: " + splitString[3] + "\n");
+
+ }
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/SortEmployees.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/SortEmployees.java
new file mode 100644
index 000000000..47f27ca47
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/SortEmployees.java
@@ -0,0 +1,69 @@
+//Created by Darius Moomivand @ 04Aug18
+package com.revature.hw;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+
+//Employee class with
+class Employee{
+ String name;
+ String department;
+ int age;
+
+
+ //Overloaded constructor added, must implement default construct (see below)
+ public Employee(String name, String department, int age) {
+ super();
+ this.name = name;
+ this.department = department;
+ this.age = age;
+ }
+
+ // No parameter constructor added to replace lost default constructor
+ public Employee() {
+ this.name = "John";
+ this.department = "Unassigned";
+ this.age = 18;
+ }
+
+ //ToString used for printing out objects
+ public String toString() {
+ return this.name + " " + this.department + " " + age;
+ }
+}
+
+class sortName implements Comparator{
+ //Method used to compare two employee objects by their name
+ public int compare(Employee o1, Employee o2) {
+ // TODO Auto-generated method stub
+ return o1.name.compareTo(o2.name);
+ }
+
+}
+
+public class SortEmployees {
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ ArrayList list = new ArrayList();
+ list.add(new Employee("Joe", "Special Projects", 20));
+ list.add(new Employee("Darius", "Software Development", 29));
+ list.add(new Employee("Annie", "Corporate", 25));
+
+ System.out.println("The Unsorted list: ");
+ for(int i = 0; i < list.size(); i++) {
+ System.out.println(list.get(i));
+ }
+
+ Collections.sort(list, new sortName());
+
+ System.out.println("The Sorted list: ");
+ for(int i = 0; i < list.size(); i++) {
+ System.out.println(list.get(i));
+ }
+ }
+
+
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/StringCount.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/StringCount.java
new file mode 100644
index 000000000..b6e01c7f6
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/StringCount.java
@@ -0,0 +1,20 @@
+//Created by Darius Moomivand @ 05Aug18
+package com.revature.hw;
+
+public class StringCount {
+ public static int counter;
+
+ // Method that takes a string and finds out how many characters it has
+ public static void count(String input) {
+ for(int i = 0; i < input.length(); i++) {
+ counter++;
+ }
+ System.out.println(counter);
+ }
+
+ public static void main(String[] args) {
+ StringCount.count(args[0]);
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Substring.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Substring.java
new file mode 100644
index 000000000..ba5b98ca6
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Substring.java
@@ -0,0 +1,22 @@
+// Created by Darius Moomivand @ 04Aug 18
+package com.revature.hw;
+
+public class Substring {
+ // Method used to find a substring of a string
+ //given an start and end index.
+ public static void sub(String s, int first, int last) {
+ System.out.print("The substring is: ");
+ for(int i = first; i < last+1; i++) {
+ System.out.print(s.charAt(i));
+ }
+ }
+
+ public static void main(String[] args) {
+ String string = "FuffyPillow";
+ int one = 0;
+ int two = 4;
+ System.out.println("The original string is: " + string);
+ Substring.sub(string, one, two);
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Switch.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Switch.java
new file mode 100644
index 000000000..f56dcd8d2
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Switch.java
@@ -0,0 +1,45 @@
+//Created by Darius Moomivand @ 05Aug18
+package com.revature.hw;
+
+import java.util.Scanner;
+
+//Switch
+public class Switch {
+ static int square = 9;
+ static java.util.Date today = new java.util.Date();
+ static String string = "I am learning Core Java";
+ String [] stringArr;
+
+ public static void switchFunc(int n) {
+ switch(n) {
+ case 1: System.out.println((int)Math.sqrt(square));
+ break;
+ case 2: System.out.println(today);
+ break;
+ case 3: String [] stringArray = string.split(" ", 4);
+ for(String s : stringArray)
+ System.out.println(s);
+ break;
+ }
+ }
+
+ public static void main(String[] args) {
+ Scanner sc = new Scanner(System.in);
+
+ System.out.println("Make a selection: \n");
+ System.out.println("Input '1' to find the square root of a number");
+ System.out.println("Input '2' to print the date");
+ System.out.println("Input '3' to split a string\n");
+
+ int select = sc.nextInt();
+ String x = sc.nextLine();
+
+ if(select == 1) {
+ System.out.println("\nEnter a number.");
+ Switch.square = sc.nextInt();
+ }
+ Switch.switchFunc(select);
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Ternary.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Ternary.java
new file mode 100644
index 000000000..488adf84e
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Ternary.java
@@ -0,0 +1,20 @@
+//Created by Darius Moomivand @ 05Aug18
+package com.revature.hw;
+
+public class Ternary {
+
+ //Method finds the smallest of two numbers and prints it
+ public static void min(int a, int b) {
+ int temp = (a < b) ? a : b;
+ System.out.println(temp);
+ }
+ public static void main(String[] args) {
+ int first = 5;
+ int second = 10;
+ Ternary.min(first,second);
+
+
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Triangle.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Triangle.java
new file mode 100644
index 000000000..dd2a28791
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/Triangle.java
@@ -0,0 +1,24 @@
+//Created by Darius Moomivand @ 05Aug18
+package com.revature.hw;
+
+public class Triangle {
+ //Method to print a triangle
+ public static void printTriangle() {
+
+ for(int i = 1; i <= 4; i++) {
+ for(int j = 1; j <= i; j++) {
+ if((i + j) % 2 == 0) {
+ System.out.print("1");
+ }else {
+ System.out.print("0");
+ }
+ }
+ System.out.println("");
+ }
+ }
+
+ public static void main(String[] args) {
+ Triangle.printTriangle();
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/revString.java b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/revString.java
new file mode 100644
index 000000000..9f39fa93a
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.hw/src/main/java/com/revature/hw/revString.java
@@ -0,0 +1,25 @@
+// Created by Darius Moomivand @ 04Aug18
+package com.revature.hw;
+
+public class revString {
+
+ // Method to reverse string
+ public static void rev(String s) {
+ System.out.print("The reverse is: ");
+
+ //For loop that prints out characters starting
+ //from the back of the string
+
+ for(int i = s.length()-1; i >= 0; i--) {
+ System.out.print(s.charAt(i));
+ }
+ }
+
+ public static void main(String[] args) {
+ String string = "elephant";
+ System.out.println("The string to reverse is: " + string + "\n");
+ revString.rev(string);
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week1/com.revature.test/pom.xml b/Darius_Moomivand_Code/Week1/com.revature.test/pom.xml
new file mode 100644
index 000000000..2d3e483e0
--- /dev/null
+++ b/Darius_Moomivand_Code/Week1/com.revature.test/pom.xml
@@ -0,0 +1,7 @@
+
+ 4.0.0
+ maventest
+ com.revature.test
+ 0.0.1-SNAPSHOT
+ maventest
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week2/Project0/pom.xml b/Darius_Moomivand_Code/Week2/Project0/pom.xml
new file mode 100644
index 000000000..51dc1d7a2
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/pom.xml
@@ -0,0 +1,21 @@
+
+ 4.0.0
+ com.rev.bank
+ bank-jdbc
+ 0.0.1-SNAPSHOT
+ Bank JDBC
+
+
+ 1.8
+ 1.8
+
+
+
+
+ com.oracle
+ ojdbc7
+ 11.2.0
+
+
+
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/AccountsDao.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/AccountsDao.java
new file mode 100644
index 000000000..c6b0b8381
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/AccountsDao.java
@@ -0,0 +1,135 @@
+package com.revature.dao;
+
+import com.revature.pojo.Accounts;
+import com.revature.pojo.AllAccounts;
+import com.revature.util.ConnectionFactory;
+
+import oracle.jdbc.OracleTypes;
+
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.List;
+
+public class AccountsDao implements Dao{
+
+ @Override
+ public List findAll() {
+ List accounts = new ArrayList();
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ String query = "Select * From accounts";
+
+ Statement statement = conn.createStatement();
+ ResultSet rs = statement.executeQuery(query);
+
+ while(rs.next()) {
+ Accounts temp = new Accounts();
+ temp.setAccId(rs.getInt("Account_Id"));
+ temp.setBalance(rs.getDouble("Balance"));
+ temp.setAccountTypeId(rs.getInt("Acc_Type_Id"));
+ accounts.add(temp);
+ }
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ return accounts;
+
+ }
+
+ @Override
+ public Accounts findOne(Integer id) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Accounts save(Accounts obj) {
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ conn.setAutoCommit(false);
+ String query = "INSERT INTO accounts(balance, acc_type_id) values(?,?)";
+ String[] keys = new String[1];
+ keys[0] = "account_id";
+
+ PreparedStatement ps = conn.prepareStatement(query, keys);
+ ps.setDouble(1, obj.getBalance());
+ ps.setInt(2, obj.getAccountTypeId());
+
+ int rows = ps.executeUpdate();
+
+ if(rows != 0) {
+ ResultSet pk = ps.getGeneratedKeys();
+ while(pk.next()) {
+ obj.setAccId(pk.getInt(1));
+ }
+
+ conn.commit();
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+
+ return obj;
+ }
+
+
+
+
+ @Override
+ public void delete(Accounts obj) {
+ // TODO Auto-generated method stub
+
+
+ }
+
+ @Override
+ public Accounts update(Accounts obj) {
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ conn.setAutoCommit(false);
+ String sql = "UPDATE ACCOUNTS SET BALANCE = ? "
+ + "WHERE ACCOUNTS.ACCOUNT_ID =?";
+
+
+ PreparedStatement ps = conn.prepareStatement(sql);
+ ps.setDouble(1, obj.getBalance());
+ ps.setInt(2, obj.getAccId());
+ ps.executeUpdate();
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return obj;
+
+ }
+
+ public String time() {
+ String transactionId = "";
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+
+ String query = "{ ? = call getDate}";
+
+ CallableStatement cs = conn.prepareCall(query);
+
+ cs.registerOutParameter(1, Types.VARCHAR);
+ cs.execute();
+
+ transactionId = cs.getNString(1);
+
+ //System.out.println(transactionId);
+
+
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return transactionId;
+
+ }
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/AllAccountsDao.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/AllAccountsDao.java
new file mode 100644
index 000000000..b7fbc1b49
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/AllAccountsDao.java
@@ -0,0 +1,79 @@
+package com.revature.dao;
+
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.revature.pojo.AllAccounts;
+import com.revature.pojo.Client;
+import com.revature.util.ConnectionFactory;
+
+import oracle.jdbc.OracleTypes;
+
+public class AllAccountsDao implements Dao{
+
+ @Override
+ public List findAll() {
+ List tempList = new ArrayList();
+
+
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ String query = "select cc.first_name, cc.last_name, acc.account_id, acc.balance\r\n" +
+ "from accounts acc \r\n" +
+ "inner join client_account ac on acc.account_id=ac.account_id \r\n" +
+ "inner join client cc on ac.client_id=cc.client_id where ac.client_id =(?);";
+
+ CallableStatement cs = conn.prepareCall(query);
+ cs.registerOutParameter(1, OracleTypes.CURSOR);
+ cs.execute();
+
+ ResultSet rs = (ResultSet) cs.getObject(1);
+ while(rs.next()) {
+ AllAccounts temp = new AllAccounts();
+ temp.setFirstName(rs.getString("FIRST_NAME"));
+ temp.setLastName(rs.getString("LAST_NAME"));
+ temp.setAccId(rs.getInt("ACCOUNT_ID"));
+ temp.setBalance(rs.getDouble("BALANCE"));
+ tempList.add(temp);
+ }
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return tempList;
+ }
+
+ @Override
+ public AllAccounts findOne(Integer id) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public AllAccounts save(AllAccounts obj) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public AllAccounts update(AllAccounts obj) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void delete(AllAccounts obj) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public String time() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/ClientAccountDoa.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/ClientAccountDoa.java
new file mode 100644
index 000000000..46c8f321b
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/ClientAccountDoa.java
@@ -0,0 +1,114 @@
+package com.revature.dao;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.revature.pojo.Accounts;
+import com.revature.pojo.Client;
+import com.revature.pojo.ClientAccount;
+import com.revature.util.ConnectionFactory;
+
+public class ClientAccountDoa implements Dao{
+
+ @Override
+ public List findAll() {
+ List clientAcc = new ArrayList();
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ String query = "select * from client_account";
+
+ Statement statement = conn.createStatement();
+ ResultSet rs = statement.executeQuery(query);
+
+ while(rs.next()) {
+ ClientAccount temp = new ClientAccount();
+ temp.setClientId(rs.getInt("client_id"));
+ temp.setAccountId(rs.getInt("account_id"));
+ clientAcc.add(temp);
+ }
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ return clientAcc;
+ }
+
+ @Override
+ public ClientAccount findOne(Integer id) {
+ return null;
+/* int g =0;
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ String sql = "select * from accounts inner join client_account on accounts.account_id=client_account.account_id\r\n" +
+ "where client_id=?;";
+ PreparedStatement ps = conn.prepareStatement(sql);
+ ps.setInt(1, id);
+ ResultSet info = ps.executeQuery();
+ while(info.next()) {
+ g = info.getInt(1);
+
+ }
+ // more code
+ }
+ catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return g;
+*/
+ }
+
+ @Override
+ public ClientAccount save(ClientAccount obj) {
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ conn.setAutoCommit(false);
+ String query = "INSERT INTO client_account(client_id, account_id) values(?,?)";
+ String[] keys = new String[1];
+ keys[0] = "account_id";
+
+ PreparedStatement ps = conn.prepareStatement(query, keys);
+ ps.setDouble(1, obj.getClientId());
+ ps.setDouble(2, obj.getAccountId());
+
+ int rows = ps.executeUpdate();
+
+/* if(rows != 0) {
+ ResultSet pk = ps.getGeneratedKeys();
+ while(pk.next()) {
+ obj.setAccId(pk.getInt(1));
+ }
+
+ conn.commit();
+ }
+*/
+ } catch (SQLException e) {
+ e.printStackTrace();
+
+ }
+
+
+ return obj;
+ }
+
+ @Override
+ public ClientAccount update(ClientAccount obj) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void delete(ClientAccount obj) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public String time() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/ClientDAO.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/ClientDAO.java
new file mode 100644
index 000000000..dd7624210
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/ClientDAO.java
@@ -0,0 +1,130 @@
+package com.revature.dao;
+
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.revature.pojo.Client;
+import com.revature.util.ConnectionFactory;
+
+import oracle.jdbc.internal.OracleTypes;
+
+public class ClientDAO implements Dao{
+
+ @Override
+ public List findAll() {
+ List clients = new ArrayList();
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ String query = "Select * From client";
+
+ Statement statement = conn.createStatement();
+ ResultSet rs = statement.executeQuery(query);
+
+ while(rs.next()) {
+ Client temp = new Client();
+ temp.setClientId(rs.getInt("client_id"));
+ temp.setFirstName(rs.getString("first_name"));
+ temp.setLastName(rs.getString("last_name"));
+ temp.setUserName(rs.getString("user_name"));
+ temp.setPassword(rs.getString("password"));
+ clients.add(temp);
+ }
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ return clients;
+ }
+
+
+ @Override
+ public Client findOne(Integer id) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Client save(Client obj) {
+
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ conn.setAutoCommit(false);
+ String query = "INSERT INTO client(first_name, last_name, user_name, password) "
+ + "values(?,?, ?, ?)";
+
+ String[] keys = new String[1];
+ keys[0] = "client_id";
+
+ PreparedStatement ps = conn.prepareStatement(query, keys);
+ ps.setString(1, obj.getFirstName());
+ ps.setString(2, obj.getLastName());
+ ps.setString(3, obj.getUserName());
+ ps.setString(4, obj.getPassword());
+
+ int rows = ps.executeUpdate();
+
+
+
+ if(rows != 0) {
+ ResultSet pk = ps.getGeneratedKeys();
+ while(pk.next()) {
+ obj.setClientId(pk.getInt(1));
+
+ }
+
+ conn.commit();
+ }
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return obj;
+
+ }
+
+
+ @Override
+ public Client update(Client obj) {
+ // TODO Auto-generated method stub
+
+ return null;
+ }
+
+ @Override
+ public void delete(Client obj) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public int getClientId(int id) {
+ int g = 0;
+ try(Connection conn = ConnectionFactory.getInstance().getConnection()){
+ String sql = "select * from genre where genre_id = ?";
+ PreparedStatement ps = conn.prepareStatement(sql);
+ ps.setInt(1, id);
+ ResultSet info = ps.executeQuery();
+ while(info.next()) {
+ g = info.getInt(1);
+
+ }
+ // more code
+ }
+ catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return g;
+ }
+
+
+ @Override
+ public String time() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/Dao.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/Dao.java
new file mode 100644
index 000000000..2b849b14b
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/dao/Dao.java
@@ -0,0 +1,19 @@
+package com.revature.dao;
+
+import java.io.Serializable;
+import java.util.List;
+
+public interface Dao {
+
+ List findAll();
+ T findOne(I id);
+ T save(T obj);
+ T update(T obj);
+ void delete(T obj);
+ default boolean isUnique(T obj) {
+ return true;
+ }
+
+ String time();
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/main/App.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/main/App.java
new file mode 100644
index 000000000..43c9deeb9
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/main/App.java
@@ -0,0 +1,282 @@
+package com.revature.main;
+
+import java.util.ArrayList;
+import java.util.InputMismatchException;
+import java.util.List;
+import java.util.Scanner;
+import java.util.Stack;
+
+import com.revature.dao.ClientDAO;
+import com.revature.dao.Dao;
+import com.revature.pojo.Accounts;
+import com.revature.pojo.AllAccounts;
+import com.revature.pojo.Client;
+import com.revature.pojo.ClientAccount;
+import com.revature.service.AccountsService;
+import com.revature.service.AllAccountService;
+import com.revature.service.ClientAccountService;
+import com.revature.service.ClientService;
+
+public class App {
+ static List allAccounts = new ArrayList();
+ static List allClients = new ArrayList();
+ static List allCA = new ArrayList();
+ static List allMyAccounts = new ArrayList();
+ static ClientAccountService caService = new ClientAccountService();
+ static AccountsService aService = new AccountsService();
+ static ClientService cService = new ClientService();
+ static AllAccountService aaService = new AllAccountService();
+ static int AccountId;
+ static int clientId;
+ static String user;
+ static String pw;
+ static Scanner scanner = new Scanner(System.in);
+ static int option;
+ static int updater;
+ static Boolean mainMenu = true;
+ static double userCID;
+ static double userAID;
+ static List myAList = new ArrayList();
+ static int accountCounter = 0;
+ static int nim;
+ static Stack stack = new Stack();
+ public static void main(String[] args) {
+ allAccounts = getAccounts();
+ allClients = getClients();
+ allCA = getClientAccount();
+
+ String time = aService.time();
+ System.out.println(time);
+
+ checkUser();
+ menu();
+
+
+ }
+
+ static void menu() {
+ while(mainMenu) {
+
+ System.out.println("Main menu\n"
+ + "1 - WITHDRAW MONEY\n"
+ + "2 - DEPOSIT MONEY\n"
+ + "3 - CREATE A NEW ACCOUNT\n"
+ + "4 - EXIT");
+
+ try {
+ option = Integer.parseInt(scanner.nextLine());
+ } catch(NumberFormatException e) {
+ System.out.println("You did not input a valid option.\n Please select again.\n");
+ menu();
+ }
+
+ switch(option) {
+
+ case 1: viewAccounts();
+ withdrawCash();
+ break;
+
+ case 2: viewAccounts();
+ depositCash();
+ break;
+
+ case 3: createAccount();
+ //break;
+
+
+ case 4: mainMenu = false;
+ System.out.println("Goodbye!");
+
+ }
+
+ }
+ getAccounts();
+ getClients();
+ getClientAccount();
+ }
+
+ static void depositCash() {
+ System.out.println("Enter the amount to deposit.\n");
+ double withdraw = scanner.nextInt();
+ Accounts w = allMyAccounts.get(updater-1);
+ System.out.println("Before Transaction " + w.toString());
+
+ Double prevBal = w.getBalance();
+ prevBal += withdraw;
+ w.setBalance(prevBal);
+ System.out.println( "After Transaction " + w.toString());
+ AccountsService ac = new AccountsService();
+ ac.updateAccount(w);
+ }
+
+ static void withdrawCash() {
+ System.out.println("Enter the amount to withdraw.\n");
+ double withdraw = scanner.nextInt();
+ Accounts w = allMyAccounts.get(updater-1);
+ System.out.println("Before Transaction " + w.toString());
+
+ Double prevBal = w.getBalance();
+ prevBal -= withdraw;
+ if(prevBal < 0) {
+ System.out.println("NOT ENOUGH FUNDS AVAILABLE!!!");
+ return;
+ }
+ w.setBalance(prevBal);
+ System.out.println( "After Transaction " + w.toString() + "\n");
+ AccountsService ac = new AccountsService();
+ ac.updateAccount(w);
+
+ }
+
+
+ static void viewAccounts() {
+ getAccounts();
+ for(Accounts t : allMyAccounts) {
+ int i =1;
+ System.out.print(i + ". ");
+ System.out.println(t.toString());
+ }
+ System.out.println("Select which account");
+ updater = scanner.nextInt();
+ }
+
+
+
+ static void checkUser() {
+ Boolean check = true;
+
+ do{
+
+ System.out.println("\n\nWELCOME TO REVATURE BANKING\n\n1. "
+ + "LOGIN TO YOUR ACCOUNT.\n2. CREATE A USERNAME.\n");
+ int userOption = Integer.parseInt(scanner.nextLine());
+
+ if(userOption == 1) {
+ System.out.println("Please enter your Username.\n");
+ user = scanner.nextLine();
+ System.out.println("Please enter your password\n");
+ pw = scanner.nextLine();
+
+
+ for(Client c : allClients) {
+ if(user.equals(c.getUserName()) && pw.equals(c.getPassword())) {
+ clientId = c.getClientId();
+ check = false;
+ break;
+ } else {
+ // System.out.println("Incorrect Login.");
+ }
+ }
+
+
+
+
+ for(ClientAccount a : allCA) {
+ myAList = new ArrayList();
+ if(clientId == a.getClientId()){
+ nim =a.getAccountId();
+ }
+ }
+
+
+ System.out.println("\nHere are your accounts:\n");
+ for(Accounts t : allAccounts) {
+ // nim = stack.peek();
+ if(nim == t.getAccId()){
+ System.out.println((accountCounter+1) + ". " + t.toString() + "\n");
+ allMyAccounts.add(t);
+ // stack.pop();
+ }
+ }
+
+
+
+
+ }else if(userOption == 2){
+ addClient();
+ check = false;
+ }else {
+ System.out.println("Invalid Response.");
+ }
+ }while(check);
+ }
+
+ static void addClient() {
+
+ System.out.println("Creating a new user.\n");
+
+ System.out.println("Enter your first name:\n");
+ String firstName = scanner.nextLine();
+ System.out.println("Enter your last name:\n");
+ String lastName = scanner.nextLine();
+ System.out.println("Enter a user name:\n");
+ String userName = scanner.nextLine();
+ System.out.println("Enter a password\n");
+ String password = scanner.nextLine();
+
+ Client newClient = new Client( firstName, lastName, userName, password);
+
+ ClientService cs = new ClientService();
+ clientId = cs.enterClient(newClient);
+
+
+
+ System.out.println("Congratulations! You have created a new user!");
+
+ }
+
+
+ static void createAccount() {
+
+ System.out.println("\nAll accounts require a $100 dollar starting fee.\n"
+ + "What type of account would you like to create?\n"
+ + "1. Checking.\n2. Savings.\n");
+
+ Integer accSelect = Integer.parseInt(scanner.nextLine());
+ Accounts newAccount = new Accounts(accSelect, 100);
+ AccountsService ac = new AccountsService();
+ AccountId = ac.saveNew(newAccount);
+
+ ClientAccount newCA = new ClientAccount();
+ newCA.setAccountId(AccountId);
+ newCA.setClientId(clientId);
+ caService.saveNew(newCA);
+
+ System.out.println("Congradulations! You have created a account!");
+
+ }
+
+
+ static List getClients() {
+ List tempClient = cService.getAll();
+
+ return tempClient;
+ }
+
+ static List getAccounts() {
+ List tempAcc = aService.getAll();
+ return tempAcc;
+ }
+
+ static List getClientAccount() {
+ List tempCA = caService.getAll();
+ return tempCA;
+ }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/Accounts.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/Accounts.java
new file mode 100644
index 000000000..b8cf30df1
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/Accounts.java
@@ -0,0 +1,45 @@
+package com.revature.pojo;
+
+public class Accounts {
+ private int accId;
+ private double balance;
+ private int accountTypeId;
+
+
+ public Accounts() {}
+ public Accounts(int accountTypeId) {
+ this.accountTypeId = accountTypeId;
+ }
+ public Accounts(int accountTypeId, double balance) {
+ super();
+ this.accountTypeId = accountTypeId;
+ this.balance = balance;
+ }
+ public int getAccountTypeId() {
+ return accountTypeId;
+ }
+ public void setAccountTypeId(int accountTypeId) {
+ this.accountTypeId = accountTypeId;
+ }
+ public double getBalance() {
+ return balance;
+ }
+ public void setBalance(double balance) {
+ this.balance = balance;
+ }
+
+
+ public int getAccId() {
+ return accId;
+ }
+
+ public void setAccId(int accId) {
+ this.accId = accId;
+ }
+
+ @Override
+ public String toString() {
+ return "Account: [ " + balance + " ]\n";
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/AllAccounts.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/AllAccounts.java
new file mode 100644
index 000000000..53c3c7d10
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/AllAccounts.java
@@ -0,0 +1,54 @@
+package com.revature.pojo;
+
+public class AllAccounts {
+
+ private String firstName;
+ private String lastName;
+ private int accId;
+ private double balance;
+
+ public AllAccounts() {}
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public int getAccId() {
+ return accId;
+ }
+
+ public void setAccId(int accId) {
+ this.accId = accId;
+ }
+
+ public double getBalance() {
+ return balance;
+ }
+
+ public void setBalance(double balance) {
+ this.balance = balance;
+ }
+
+ public AllAccounts(String firstName, String lastName, int accId, double balance) {
+ super();
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.accId = accId;
+ this.balance = balance;
+ }
+
+
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/Client.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/Client.java
new file mode 100644
index 000000000..627dea500
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/Client.java
@@ -0,0 +1,70 @@
+package com.revature.pojo;
+
+public class Client {
+
+ private int clientId;
+ private String firstName;
+ private String lastName;
+ private String userName;
+ private String password;
+
+ public Client() {}
+
+ public Client(String firstName, String lastName, String userName, String password) {
+ super();
+
+
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.userName = userName;
+ this.password = password;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ @Override
+ public String toString() {
+ return "Client [clientId=" + clientId + ", firstName=" + firstName + ", lastName=" + lastName + ", userName="
+ + userName + ", password=" + password + "]";
+ }
+
+ public int getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(int clientId) {
+ this.clientId = clientId;
+ }
+
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/ClientAccount.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/ClientAccount.java
new file mode 100644
index 000000000..c36ec5349
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/pojo/ClientAccount.java
@@ -0,0 +1,38 @@
+package com.revature.pojo;
+
+public class ClientAccount {
+ private int clientId;
+ private int accountId;
+
+ public ClientAccount() {}
+
+ public ClientAccount(int clientId, int accountId) {
+ super();
+ this.clientId = clientId;
+ this.accountId = accountId;
+ }
+
+ public int getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(int clientId) {
+ this.clientId = clientId;
+ }
+
+ public int getAccountId() {
+ return accountId;
+ }
+
+ public void setAccountId(int accountId) {
+ this.accountId = accountId;
+ }
+
+ @Override
+ public String toString() {
+ return "ClientAccount [clientId=" + clientId + ", accountId=" + accountId + "]";
+ }
+
+
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/AccountsService.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/AccountsService.java
new file mode 100644
index 000000000..eb9b9fd4c
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/AccountsService.java
@@ -0,0 +1,39 @@
+package com.revature.service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.revature.dao.AccountsDao;
+import com.revature.dao.Dao;
+import com.revature.pojo.Accounts;
+import com.revature.pojo.ClientAccount;
+
+public class AccountsService {
+
+ static Dao aDao = new AccountsDao();
+
+
+ public int saveNew(Accounts obj) {
+ Accounts account = aDao.save(obj);
+ int newId = account.getAccId();
+ return newId;
+ }
+
+ public List getAll(){
+ return aDao.findAll();
+ }
+
+ public void updateAccount(Accounts obj){
+ aDao.update(obj);
+ }
+
+ public String time() {
+ String time = aDao.time();
+ return time;
+ }
+
+
+
+
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/AllAccountService.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/AllAccountService.java
new file mode 100644
index 000000000..5e94e62b0
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/AllAccountService.java
@@ -0,0 +1,25 @@
+package com.revature.service;
+
+import java.util.List;
+
+import com.revature.dao.AllAccountsDao;
+import com.revature.dao.Dao;
+import com.revature.pojo.AllAccounts;
+
+public class AllAccountService {
+
+ static Dao aaDao = new AllAccountsDao();
+ String string;
+
+
+ public List getAll(int clientId){
+ return aaDao.findAll();
+
+ }
+
+ public String getTime() {
+ aaDao.findOne(null);
+ return string;
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/ClientAccountService.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/ClientAccountService.java
new file mode 100644
index 000000000..9bef5228d
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/ClientAccountService.java
@@ -0,0 +1,27 @@
+package com.revature.service;
+
+import java.util.List;
+
+import com.revature.dao.Dao;
+import com.revature.pojo.ClientAccount;
+import com.revature.dao.ClientAccountDoa;
+
+public class ClientAccountService {
+
+
+ static Dao caDao = new ClientAccountDoa();
+
+
+ public void saveNew(ClientAccount obj) {
+ caDao.save(obj);
+ }
+
+ public List getAll(){
+ return caDao.findAll();
+ }
+
+
+ public void getAccounts(int id) {
+ caDao.findOne(id);
+ }
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/ClientService.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/ClientService.java
new file mode 100644
index 000000000..53b81d790
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/service/ClientService.java
@@ -0,0 +1,27 @@
+package com.revature.service;
+
+import java.util.List;
+
+import com.revature.dao.ClientDAO;
+import com.revature.dao.Dao;
+import com.revature.pojo.Client;
+
+public class ClientService {
+
+ static Dao cDao = new ClientDAO();
+
+ public int enterClient(Client newClient) {
+ Client client = cDao.save(newClient);
+ int newId = client.getClientId();
+ return newId;
+ }
+
+ public void getClientId(int id) {
+
+ }
+
+
+ public List getAll(){
+ return cDao.findAll();
+ }
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/util/ConnectionFactory.java b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/util/ConnectionFactory.java
new file mode 100644
index 000000000..613f52afd
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/java/com/revature/util/ConnectionFactory.java
@@ -0,0 +1,51 @@
+package com.revature.util;
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Properties;
+
+public class ConnectionFactory {
+
+ private static ConnectionFactory cf = null;
+ private static Boolean build =true;
+
+ private ConnectionFactory() {
+ build = false;
+ }
+
+ public static synchronized ConnectionFactory getInstance() {
+ if(build) cf = new ConnectionFactory();
+ return cf;
+ }
+
+ public Connection getConnection() {
+ Connection conn = null;
+ Properties prop = new Properties();
+ String path = "C://Users//Darius//my_git_repos//1807Jul30Java//Darius_Moomivand_Code//Week2//Project0//src//main//resources//application.properties";
+ try {
+ prop.load(new FileReader(path));
+ Class.forName(prop.getProperty("driver"));
+
+ conn = DriverManager.getConnection(
+ prop.getProperty("url"),
+ prop.getProperty("usr"),
+ prop.getProperty("pwd"));
+
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ return conn;
+ }
+}
diff --git a/Darius_Moomivand_Code/Week2/Project0/src/main/resources/application.properties b/Darius_Moomivand_Code/Week2/Project0/src/main/resources/application.properties
new file mode 100644
index 000000000..7de589ab3
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/Project0/src/main/resources/application.properties
@@ -0,0 +1,4 @@
+driver=oracle.jdbc.driver.OracleDriver
+url=jdbc:oracle:thin:@localhost:1521/XE
+usr=p01
+pwd=password
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week2/SQLwork/SQL_HW.sql b/Darius_Moomivand_Code/Week2/SQLwork/SQL_HW.sql
new file mode 100644
index 000000000..6c300203e
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/SQLwork/SQL_HW.sql
@@ -0,0 +1,4 @@
+/*
+SQL Homework
+*/
+
diff --git a/Darius_Moomivand_Code/Week2/jbdc/.gitignore b/Darius_Moomivand_Code/Week2/jbdc/.gitignore
new file mode 100644
index 000000000..e3f5eb143
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/jbdc/.gitignore
@@ -0,0 +1 @@
+/.recommenders/
diff --git a/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/pom.xml b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/pom.xml
new file mode 100644
index 000000000..9ea12c319
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/pom.xml
@@ -0,0 +1,21 @@
+
+ 4.0.0
+ com.rev
+ bookstore-jdbc
+ 0.0.1-SNAPSHOT
+ BookStore JDBC app
+
+
+ 1.8
+ 1.8
+
+
+
+
+ com.oracle
+ ojdbc7
+ 11.2.0
+
+
+
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/java/com/rev/dao/GenreDAO.java b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/java/com/rev/dao/GenreDAO.java
new file mode 100644
index 000000000..cdd14dcfe
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/java/com/rev/dao/GenreDAO.java
@@ -0,0 +1,49 @@
+package com.rev.dao;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.rev.pojo.Genre;
+import com.rev.util.ConnectionFactory;
+
+public class GenreDAO {
+
+ public static void main(String[] args) {
+ //LETS SEE THIS WORK!
+ List genres = findAll();
+ for(Genre g : genres) {
+ System.out.println(g);
+ }
+ }
+
+ public static List findAll(){
+ List genres = new ArrayList();
+ try(Connection conn = ConnectionFactory
+ .getInstance().getConnections()){
+ String query = "select * from genre";
+
+ // interfaces
+ Statement statement = conn.createStatement();
+ ResultSet rs = statement.executeQuery(query);
+
+ while(rs.next()) {
+ Genre temp = new Genre();
+ temp.setId(rs.getInt(1));
+ String name = rs.getString(2);
+ temp.setName(name);
+ genres.add(temp);
+
+ }
+
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ return genres;
+ }
+
+}
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/java/com/rev/pojo/Genre.java b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/java/com/rev/pojo/Genre.java
new file mode 100644
index 000000000..819c9dd9f
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/java/com/rev/pojo/Genre.java
@@ -0,0 +1,33 @@
+package com.rev.pojo;
+
+public class Genre {
+
+ private int id;
+ private String name;
+
+ public Genre() {}
+
+ public Genre(int id, String name) {
+ super();
+ this.id = id;
+ this.name = name;
+ }
+ public int getId() {
+ return id;
+ }
+ public void setId(int id) {
+ this.id = id;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ @Override
+ public String toString() {
+ return "Genre [id=" + id + ", name=" + name + "]";
+ }
+
+
+}
diff --git a/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/java/com/rev/util/ConnectionFactory.java b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/java/com/rev/util/ConnectionFactory.java
new file mode 100644
index 000000000..a3e629310
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/java/com/rev/util/ConnectionFactory.java
@@ -0,0 +1,62 @@
+package com.rev.util;
+
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.util.Properties;
+
+public class ConnectionFactory {
+
+ private static ConnectionFactory cf = null;
+ private static Boolean build =true;
+
+ private ConnectionFactory() {
+ build = false;
+ }
+
+ public static synchronized ConnectionFactory getInstance() {
+ if(build) cf = new ConnectionFactory();
+ return cf;
+ }
+
+ public Connection getConnections() {
+ Connection conn = null;
+ Properties prop = new Properties();
+ String path = "C://Users//Darius//my_git_repos//1807Jul30Java//Darius_Moomivand_Code//Week2//jbdc//bookstore-jdbc//src//main//resources//application.properties";
+ try {
+ prop.load(new FileReader(path));
+ Class.forName(prop.getProperty("driver"));
+
+ conn = DriverManager.getConnection(
+ prop.getProperty("url"),
+ prop.getProperty("usr"),
+ prop.getProperty("pwd"));
+
+
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+
+ return conn;
+ }
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/resources/application.properties b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/resources/application.properties
new file mode 100644
index 000000000..24385626a
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/jbdc/bookstore-jdbc/src/main/resources/application.properties
@@ -0,0 +1,4 @@
+driver=oracle.jdbc.driver.OracleDriver
+url=jdbc:oracle:thin:@localhost:1521/XE
+usr=DEMO
+pwd=DEMO
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week2/jbdc/servletdemo/pom.xml b/Darius_Moomivand_Code/Week2/jbdc/servletdemo/pom.xml
new file mode 100644
index 000000000..13de11ae4
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/jbdc/servletdemo/pom.xml
@@ -0,0 +1,8 @@
+
+ 4.0.0
+ com.ex
+ servletdemo
+ 0.0.1-SNAPSHOT
+ war
+ servletDemo
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Week2/mavendemo/pom.xml b/Darius_Moomivand_Code/Week2/mavendemo/pom.xml
new file mode 100644
index 000000000..2b1bebb24
--- /dev/null
+++ b/Darius_Moomivand_Code/Week2/mavendemo/pom.xml
@@ -0,0 +1,6 @@
+
+ 4.0.0
+ com.ex
+ mavendemo
+ 0.0.1-SNAPSHOT
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/Serial.html b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/Serial.html
new file mode 100644
index 000000000..788413f62
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/Serial.html
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+ Serialization
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Serialization
+
Serialization is the process of translating data structures or object state into a format that can be stored (for example, in a file or memory buffer) or transmitted (for example, across a network connection link) and reconstructed later (possibly in a different computer environment).
Serialization breaks the opacity of an abstract data type by potentially exposing private implementation details.
+
Trivial implementations which serialize all data members may violate encapsulation.
+
To discourage competitors from making compatible products, publishers of proprietary software often keep the details of their programs' serialization formats a trade secret.
+
Many institutions, such as archives and libraries, attempt to future proof their backup archives—in particular, database dumps—by storing them in some relatively human-readable serialized format.
Xerox Network Systems Courier technology in the early 1980s influenced the first widely adopted standard
+
Sun Microsystems published the External Data Representation (XDR) in 1987.
+
In the late 1990s, a push to provide an alternative to the standard serialization protocols started: XML was used to produce a human readable text-based encoding.
+
JSON is a lighter plain-text alternative to XML which is also commonly used for client-server communication in web applications. JSON is based on JavaScript syntax, but is supported in other programming languages as well.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/Serial.js b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/Serial.js
new file mode 100644
index 000000000..0c5b7aaa5
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/Serial.js
@@ -0,0 +1,14 @@
+window.onload =function(){
+
+ $('#LMButton').on('click',wiki);
+ function wiki(){
+ window.location.assign('https://en.wikipedia.org/wiki/Serialization#Serialization_formats');
+
+ }
+
+ $('#gSearch').on('click', google);
+ function google(){
+ window.location.assign('https://www.google.com');
+ }
+
+}
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/cat.png b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/cat.png
new file mode 100644
index 000000000..c30f35083
Binary files /dev/null and b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/cat.png differ
diff --git a/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/cerealized.jpeg b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/cerealized.jpeg
new file mode 100644
index 000000000..c31133a8e
Binary files /dev/null and b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/cerealized.jpeg differ
diff --git a/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/one.jpg b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/one.jpg
new file mode 100644
index 000000000..624e1901a
Binary files /dev/null and b/Darius_Moomivand_Code/Weeks3-4/assignments/Webpage/one.jpg differ
diff --git a/Darius_Moomivand_Code/Weeks3-4/assignments/jsAssign.html b/Darius_Moomivand_Code/Weeks3-4/assignments/jsAssign.html
new file mode 100644
index 000000000..209325c75
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/assignments/jsAssign.html
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+ Document
+
+
+
+
+
+
+
+
+
+
Darius Moomivand
+
This is my html project page.
+
+
+
+
+
Problem: 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Problem: 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Problem: 3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Problem: 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Problem: 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Problem: 6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Problem: 7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Problem: 8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Weeks3-4/assignments/jsAssign.js b/Darius_Moomivand_Code/Weeks3-4/assignments/jsAssign.js
new file mode 100644
index 000000000..5fb6fad50
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/assignments/jsAssign.js
@@ -0,0 +1,163 @@
+window.onload =function(){
+
+ $('#mybutton').on('click',fib);
+
+
+ function fib(){
+ let num = $("#input").val();
+ var a =1;
+ var b =0;
+ var temp;
+
+ while (num >= 0){
+ temp = a;
+ a = a + b;
+ b = temp;
+ num--;
+ }
+
+ $('#results').html(b);
+ }
+
+
+ $('#bubButton').on('click',bubble);
+
+ function bubble(){
+ var arr = [5, 4, 3, 2, 1];
+ $('#bubIn').html(arr);
+
+ for(let i = 0; i < arr.length; i++){
+ for(let j = 0; j < arr.length-1;j++){
+ if(arr[j]>arr[j+1]){
+ let temp = arr[j+1];
+ arr[j+1] = arr[j];
+ arr[j] = temp;
+ }
+ }
+
+ }
+ $('#bubbleAns').html(arr);
+
+ }
+
+ $('#revButton').on('click',revString);
+
+ function revString(){
+ let myString = 'string';
+ $('#revIn').html(myString);
+
+ let reversed = "";
+ for (var i = myString.length - 1; i >= 0; i--){
+ reversed += myString[i];
+ }
+
+ $('#reverseAns').html(reversed);
+ }
+
+ $('#factButt').on('click', factorial);
+
+ function factorial(){
+ let num = 5;
+ let temp =1;
+
+ $('#factorIn').html(num);
+
+ for(let i = num; i >0; i--){
+ temp = temp * i;
+ }
+
+ $('#factAns').html(temp);
+
+ }
+
+ $('#SubStringResult').on('click', substring);
+
+ function substring(){
+ let Astring = $('#subinput1').val();
+ let oneInt = $('#subinput2').val();
+ let twoInt = $('#subinput3').val();
+
+ let Bstring = Astring.substring(oneInt, twoInt);
+ $('#theAnswer').html(Bstring);
+
+ }
+
+
+ $('#checkEven').on('click',isItEven);
+
+ function isItEven(){
+ let num = $("#isEven").val();
+
+ if(num & 1){
+ $('#prob6Ans').html('Its ODD');
+ }else {
+ $('#prob6Ans').html('Its EVEN');
+ }
+
+ }
+
+ $('#pallindromeB').on('click', isPally);
+
+ function isPally(){
+ var newString = $('#inboundString').val();
+ var left = 0;
+ var right = newString.length-1;
+ while(left < right){
+ if(newString[left++] !== newString[right--]){
+ console.log('test');
+ $('#IsPalinRes').html('Not A Palindrome');
+ return;
+ }
+ }
+ $('#IsPalinRes').html('A Palindrome');
+
+ }
+
+
+ $('#makeShape').on('click', shapes);
+ function shapes(){
+ console.log('test');
+ let shape = $('#shapeIn1').val();
+ let height = $('#shapeIn2').val();
+ let character = $('#shapeIn3').val();
+
+ switch(shape){
+ case 'Square':
+ for(let i = 0; i < height;i++){
+ for(let j = 0; j < height;j++){
+ console.log(character);
+ }
+ console.log('\n');
+ }
+ break;
+ case 'Triangle':
+ for(let i = 0; i < height;i++){
+ for(let j= 0;j<=i;j++){
+ console.log(character);
+ }
+ console.log('\n');
+ }
+ break;
+ case 'Diamond':
+ for(let i = 0; i < height;i++){
+ for(let j= 0;j<=i;j++){
+ console.log(character);
+ }
+ console.log('\n');
+ }
+ for(let i = height; i > 0;i--){
+ for(let j= 1;j<=i;j++){
+ console.log(character);
+ }
+ console.log('\n');
+ }
+
+ break;
+ default:
+ console.log("Invalid input");
+ break;
+ }
+
+ }
+
+}
diff --git a/Darius_Moomivand_Code/Weeks3-4/assignments/js_assignment.txt b/Darius_Moomivand_Code/Weeks3-4/assignments/js_assignment.txt
new file mode 100644
index 000000000..0389fa7fd
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/assignments/js_assignment.txt
@@ -0,0 +1,101 @@
+Javascript Homework
+Due Monday 8/20 -- to be pushed by 5PM in your branch
+
+-----------------------------------------------------------------------------------
+Create an HTML file that takes in input and carries out at least 8
+of the following functions and manipulates the DOM to show the outcome.
+(Can include #1, though we've completed it together in class)
+Please put the question itself as a comment above each answer.
+-----------------------------------------------------------------------------------
+
+1. Fibonacci
+Define function: fib(n)
+Return the nth number in the fibonacci sequence.
+
+2. Bubble Sort
+Define function: bubbleSort(numArray)
+Use the bubble sort algorithm to sort the array.
+Return the sorted array.
+
+3. Reverse String
+Define function: reverseStr(someStr)
+Reverse and return the String.
+
+4. Factorial
+Define function: factorial(someNum)
+Use recursion to compute and return the factorial of someNum.
+
+5. Substring
+Define function substring(someStr, length, offset)
+Return the substring contained between offset and (offset + length) inclusively.
+If incorrect input is entered, use the alert function and describe why the input was incorrect.
+
+6. Even Number
+Define function: isEven(someNum)
+Return true if even, false if odd.
+Do not use % operator.
+
+7. Palindrome
+Define function isPalindrome(someStr)
+Return true if someStr is a palindrome, otherwise return false
+
+8. Shapes
+Define function: printShape(shape, height, character)
+shape is a String and is either "Square", "Triangle", "Diamond".
+height is a Number and is the height of the shape. Assume the number is odd.
+character is a String that represents the contents of the shape. Assume this String contains just one character.
+Use a switch statement to determine which shape was passed in.
+Use the console.log function to print the desired shape.
+Example for printShape("Square", 3, "%");
+%%%
+%%%
+%%%
+Example for printShape("Triangle", 3, "$");
+$
+$$
+$$$
+Example for printShape("Diamond", 5, "*");
+ *
+ ***
+*****
+ ***
+ *
+
+9. Object literal
+Define function traverseObject(someObj)
+Print every property and it's value.
+
+10. Delete Element
+Define function deleteElement(someArr)
+Print length
+Delete the third element in the array.
+Print length
+The lengths should be the same.
+
+11. Splice Element
+Define function spliceElement(someArr)
+Print length
+Splice the third element in the array.
+Print length
+The lengths should be one less than the original length.
+
+12. Defining an object using a constructor
+Define a function Person(name, age)
+The following line should set a Person object to the variable john:
+ var john = new Person("John", 30);
+
+13. Defining an object using an object literal
+Define function getPerson(name, age)
+The following line should set a Person object to the variable john:
+ var john = getPerson("John", 30);
+
+14. Display the current time on the top right of your HTML page,
+updating every second
+
+15. Descending order
+Your task is to make a function that can take any non-negative
+integer as a argument and return it with its digits in descending
+order. Essentially, rearrange the digits to create the highest possible number.
+
+
+
diff --git a/Darius_Moomivand_Code/Weeks3-4/css/css101.css b/Darius_Moomivand_Code/Weeks3-4/css/css101.css
new file mode 100644
index 000000000..380a20b24
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/css/css101.css
@@ -0,0 +1,9 @@
+.first{
+ color: green !important;
+ font-size: 25px;
+}
+
+li {
+ color: #b41954
+}
+
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/README.md b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/README.md
new file mode 100644
index 000000000..be7b12d7d
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/README.md
@@ -0,0 +1,12 @@
+# Servlets
+
+* [servlets](servlets.md)
+* [redirect vs forward](redirect-vs-forward.md)
+* [printwriter](printwriter.md)
+* [http session](http-session.md)
+* [ServletContext and ServletConfig](servletcontext-and-servletconfig.md)
+
+
+
+* [http status codes](http-status-codes.md)
+* [http methods](http-methods.md)
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/http-methods.md b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/http-methods.md
new file mode 100644
index 000000000..63282c026
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/http-methods.md
@@ -0,0 +1,18 @@
+# HTTP Methods
+* GET
+* PUT
+* POST
+* DELETE
+* PATCH
+* OPTIONS
+* TRACE
+* HEAD
+* CONNECT
+
+# GET vs POST
+* GET can only send data in url
+ * limited
+ * can bookmark or copy url and email to a friend
+* POST can send data in request body
+ * unlimited
+ * more secure
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/http-session.md b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/http-session.md
new file mode 100644
index 000000000..54189c4cb
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/http-session.md
@@ -0,0 +1,35 @@
+# Session
+
+* a user using a site for a time period (until 30 minutes inactive)
+* allows us to store data between requests
+
+# HttpSession
+* Save things about a specific user
+* Data in session scope exist for as long as the user is using the site
+
+* Some methods:
+ * setAttibute
+ * getAttribute
+ * removeAttribute
+ * invalidate
+ * setMaxInactiveInterval
+
+
+# HttpServletRequest
+* Save things about a request
+* Data in request scope exist until a response is sent back to the client
+
+* Some methods:
+ * setAttribute
+ * getAttribute
+ * getParameter (form data / url data)
+
+
+```
+HttpSession httpSession = request.getSession();
+```
+
+
+# Cookies
+* file on the client's computer
+* `JSESSIONID` is a cookie that holds a user's unique session id
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/http-status-codes.md b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/http-status-codes.md
new file mode 100644
index 000000000..b9171f14f
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/http-status-codes.md
@@ -0,0 +1,6 @@
+# http status codes
+* **1xx** Informational
+* **2xx** Success
+* **3xx** Redirection
+* **4xx** Client Error
+* **5xx** Server Error
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/printwriter.md b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/printwriter.md
new file mode 100644
index 000000000..cbb7a5552
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/printwriter.md
@@ -0,0 +1,11 @@
+# PrintWriter
+* manually write response
+
+```
+String name = "john";
+
+PrintWriter printWriter = response.getWriter();
+
+printWriter.write("
hello from " + name + "
");
+printWriter.write("
this seems like a neat way of doing things
");
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/redirect-vs-forward.md b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/redirect-vs-forward.md
new file mode 100644
index 000000000..e1f151453
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/redirect-vs-forward.md
@@ -0,0 +1,17 @@
+# redirect
+* sends a 301 response
+* **pro:** changes url
+* **con:** total of 2 requests/responses
+
+```
+response.sendRedirect("dog.html");
+```
+
+# forward
+* sends response directly
+* **pro:** only 1 request/response
+* **con:** url does not change
+
+```
+request.getRequestDispatcher("dog.html").forward(request, response);
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/servletcontext-and-servletconfig.md b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/servletcontext-and-servletconfig.md
new file mode 100644
index 000000000..2c47c990c
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/servletcontext-and-servletconfig.md
@@ -0,0 +1,41 @@
+# ServletContext and ServletConfig
+* `ServletContext` contains config for **all** servlets
+
+```
+
+
+
+ favoriteColor
+ blue
+
+
+
+ favoriteAnimal
+ dog
+
+
+
+```
+
+* `ServletConfig` contains config for **one** servlet
+
+```
+
+
+
+ cat
+ com.example.CatServlet
+
+
+ favoriteColor
+ blue
+
+
+
+ favoriteAnimal
+ dog
+
+
+
+
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/servlets.md b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/servlets.md
new file mode 100644
index 000000000..f4edbd2ca
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/Servlets/servlets.md
@@ -0,0 +1,72 @@
+# servlets
+* allows Java to accept **requests** and send back **responses**
+* `Servlet`, `GenericServlet`, `HttpServlet`
+
+# web.xml
+* *deployment descriptor*
+* **The** configuration file for java web applications
+* located in `WEB-INF/web.xml`
+
+# create a servlet
+
+create a class that extends `HttpServlet`
+
+```
+public class HelloWorld extends HttpServlet {
+ //override methods
+}
+```
+
+configure in `web.xml`
+
+```
+
+ cat
+ com.example.HelloWorld
+
+
+
+ cat
+ /dog
+
+```
+
+Instead of configuring in `web.xml` you can also use annotations
+
+```
+@WebServlet("/dog")
+public class HelloWorld extends HttpServlet {
+ //override methods
+}
+```
+
+# Methods you can override
+* doGet, doPost, doPut, doDelete, doOptions, ...
+
+```
+@Override
+protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+
+}
+
+```
+
+# let's do an example
+
+# lifecycle
+* `init()`, `service()`, `destroy()`
+
+# init
+* maps urls to the servlet
+* instantiates servlet object
+
+# service
+* called on every request to the servlet
+ * a new thread is created first
+* if GET request then calls `doGet()`
+* if POST request then calls `doPost()`
+* if DELETE request then calls `doDelete()`
+
+# destroy
+* destroys servlet
+* called when web container stops
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/README.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/README.md
new file mode 100644
index 000000000..4b822726a
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/README.md
@@ -0,0 +1,32 @@
+# JavaScript Overview - learn to program in JavaScript
+
+* [background](background.md)
+* [values](values.md)
+* [operators](operators.md)
+* [objects](objects.md)
+* [arrays](arrays.md)
+* [functions](functions.md)
+* [inheritance](inheritance.md)
+* [watch out](watch-out.md)
+* [other](other.md)
+
+
+# DOM - learn how JavaScript works in a browser
+## JavaScript and the DOM
+
+* [intro](intro.md)
+* [manipulating the dom](manipulating-dom.md)
+* [events](events.md)
+* [ajax](ajax.md) Â
+* [json](json.md)
+* [jquery](jquery.md)
+* pokeapi example
+* GitHub Pages
+
+### Useful Links
+* [Douglas Crockford](https://www.youtube.com/watch?v=v2ifWcnQs6M&list=PL62E185BB8577B63D)
+
+# Client side
+* [html](html.md)
+* [css](css.md)
+* [bootstrap](bootstrap.md)
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/ajax.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/ajax.md
new file mode 100644
index 000000000..b0254a67f
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/ajax.md
@@ -0,0 +1,94 @@
+# ajax
+* Asynchronous JavaScript and XML
+* ignore the XML part of that word, JSON is frequently used
+* the ability to send requests from JavaScript **asynchronously**
+ * this means we can send a request and forget about it
+ * when we get the response, then we will handle it
+ * do not have to wait in the meantime (think about when you text or email someone... do you have to wait for a response?)
+* AJAX has four steps
+ 1. create object
+ + define onreadystatechange function
+ + open request *(can configure HTTP method and url)*
+ + send request *(can send data in request body)*
+* naive example - do not run
+
+```
+var xhr = new XMLHttpRequest();
+
+xhr.onreadystatechange = function(){
+ if(this.readyState == 4 && this.status == 200){
+ console.log("response received!");
+ console.log(this.responseText);
+ }
+}
+
+xhr.open("GET", "someUrl", true);
+
+xhr.send();
+
+```
+
+### creating the object
+* most of the time, the object we need is XMLHttpRequest
+* older versions of IE had a different object from everyone else
+
+```
+var xhr;
+if(XMLHttpRequest) {
+ xhr = new XMLHttpRequest();
+}else {
+ xhr = new ActiveXObject("Microsoft.XMLHTTP"); //IE6 and older
+}
+```
+
+### onreadystatechange
+* most notably, XMLHttpRequest has members called `readystate`, `status` and `responseText`
+* the `onreadystatechange` function is called whenever the `readystate` member changes
+
+| readystate | meaning |
+|:----------:|:--------------------------------------:|
+| 0 | request not initialized |
+| 1 | server connection established |
+| 2 | request received |
+| 3 | processing request |
+| 4 | request finished and response is ready |
+
+* obviously we care the most when `readystate` is 4
+* `status` will be one of the HTTP status codes - see [this reference](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
+ * this is a naive example because we only handle when the status code is `200`
+* `responseText` is the response body represented as a string
+
+### open request
+* `open(method, url, async)`
+ * **method** - the HTTP method
+ * **url** - the url to send the request to
+ * **async** - true or false *(default is true)*
+
+
+### send request
+* `send(string)`
+* sends the request
+* **string** is optional
+ * use to send data in the request body
+ * cannot use with GET requests
+
+### example
+* open a browser and enter following url: `https://pokeapi.co/api/v2/pokemon/pikachu/`
+* we are going to get that data using JavaScript
+* you can enter the following into JSFiddle *(JavaScript section)*
+
+```
+var xhr = new XMLHttpRequest();
+
+xhr.onreadystatechange = function(){
+ if(this.readyState == 4 && this.status == 200){
+ var pikachu = JSON.parse(this.responseText);
+ console.log(pikachu.name);
+ console.log(pikachu);
+ }
+}
+
+xhr.open("GET", "https://pokeapi.co/api/v2/pokemon/pikachu/");
+
+xhr.send();
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/arrays.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/arrays.md
new file mode 100644
index 000000000..6fd6d744b
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/arrays.md
@@ -0,0 +1,62 @@
+# arrays
+* array literal `[]`
+* `,` separated values
+
+```
+var arr = [];
+
+var arr = [10, 20, "John", "Amy", {}];
+```
+
+
+* `[]` is preferred to `new Array()`
+* should not use dot notation, instead use *subscript notation*
+
+```
+var arr = [10,20,30];
+
+arr[1]; //20
+```
+
+* Array inherits from Object
+ * array indices are converted to strings and used as names for retreiving values
+ * this means arrays and objects are almost exactly the same
+
+```
+var example1 = ["John", 20, true];
+
+var example2 = {
+ "0" : "John",
+ "1" : 20,
+ "2" : true
+};
+```
+
+* main difference between objects and arrays: arrays have *array nature*
+ * arrays have a length
+
+### length
+* arrays have a length member
+* always one larger than the highest integer subscript
+ * allows traditional use of for loop
+
+```
+var arr = [];
+ //arr.length is 0
+arr[9] = "allo";
+ //arr.length is 10
+
+```
+
+
+### JavaScript arrays in a nutshell
+* very efficient for sparse arrays
+* not very efficient in most other cases
+* one advantage: no need to provide a length or type when creating an array
+
+
+### should I use objects or arrays?
+* use objects when names are arbitrary strings
+* use arrays when names are sequential integers
+
+
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/background.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/background.md
new file mode 100644
index 000000000..2f8ae4473
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/background.md
@@ -0,0 +1,20 @@
+### Background
+* Almost completely unrelated to Java
+* Loosely typed
+* A lot of bad and good parts
+* No classes
+* Object oriented
+
+### Key Ideas
+* Load and go delivery
+* Loose typing
+* Object as general containers
+* Prototypal inheritance
+* Lambda
+* Linkage through global variables
+
+### C
+* JavaScript is syntactically a C family language
+* It differs from C mainly in its type system, which allows functions to be values
+
+
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/bootstrap.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/bootstrap.md
new file mode 100644
index 000000000..823486409
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/bootstrap.md
@@ -0,0 +1,14 @@
+# bootstrap
+* Created by Twitter
+* CSS library (a giant CSS file)
+ * also includes JavaScript and fonts
+* mobile first
+* responsive
+
+
+### Using Bootstrap's JavaScript
+* Bootstrap's JavaScript file depends on jQuery
+
+### How to use Bootstrap
+* can download css, js, font files
+* can use CDN
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/css.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/css.md
new file mode 100644
index 000000000..ba29ac026
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/css.md
@@ -0,0 +1,57 @@
+# css
+* style HTML pages
+
+# selectors
+* choose **what** to style
+* `#` id
+* `.` class
+
+# examples
+
+select element with **id of test**
+
+```css
+#test {
+
+}
+```
+
+select all elements with **class of test**
+
+```css
+.test {
+
+}
+```
+
+elements that have **both classes**
+
+```css
+.one.two {
+
+}
+```
+
+paragraphs that have **both classes**
+
+```css
+p.one.two {
+
+}
+```
+
+**descendants** of #test with class blue
+
+```css
+#test .blue {
+
+}
+```
+
+**direct descendants** of #test with class blue
+
+```css
+#test > .blue {
+
+}
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/events.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/events.md
new file mode 100644
index 000000000..960ae566c
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/events.md
@@ -0,0 +1,175 @@
+# events
+
+### event categories
+* [reference](http://www.w3schools.com/jsref/dom_obj_event.asp)
+
+| categories | | | |
+|------------|------------|--------------|-------|
+| mouse | keyboard | frame/object | form |
+| drag | clipboard | print | media |
+| animation | transition | server-sent | misc |
+| touch | | | |
+
+### create event listeners
+* three ways to create event listeners
+ * ``
+ * `element.onclick = function(){}`
+ * `element.addEventListener("click", function(){});`
+
+### the two bad ways
+* these are perfect examples of obtrusive / bad JavaScript
+* put in HTML section of JSFiddle
+
+```
+
my div
+
+
+```
+
+```
+
my div
+
+
+```
+
+### the one good way
+* this is unobtrusive / good JavaScript
+* put in HTML section of JSFiddle
+
+```
+
my div
+
+
+```
+
+```
+
my div
+
+
+```
+
+### addEventListener
+* `element.addEventListener(type, handler, useCapture)`
+ * **type** - type of event
+ * **handler** - the function to handle this event
+ * **useCapture** - true to use capture *(default is false)*
+ * most of the time you do not want capture; instead use bubble
+
+
+### event handler
+* event handlers get passed an `event` parameter
+* `event.stopPropagation()` is an important method
+ * it will stop calling event handlers
+* `event.target` is an important member
+ * always points to the lowest element on the tree that was clicked
+* while inside the event handler, `this` points to the element that was clicked on
+*
+
+```
+
my div
+
+
+```
+
+### bubble vs capture
+* [reference](https://javascript.info/tutorial/bubbling-and-capturing)
+* when you click on something, you are actually clicking on many different elements
+* bubble and capture determine how you traverse those elements and call their event handlers
+* assume I have an event handler for `click` on the elements `body` and `div`
+
+```
+
+
hello
+
+```
+
+* **bubble** starts at the bottom of the tree and works its way up
+ * first the event handler for the `div` is called, then the event handler for the `body` is called
+* **capture** starts at the top of the tree and works its way down
+ * first `body` is called, then `div`
+* most of the time, **bubble** is what you want
+* assume we are using bubble and I want the event handler to run for `div`, but not for `body`
+ * this is where `event.stopPropagation()` comes in handy
+
+
+* example - putting it all together
+ * put in HTML section of JSFiddle
+
+
+* CSS
+
+```
+div {
+ text-align:center;
+ margin: auto;
+}
+
+#three {
+ background-color: red;
+ width: 100px;
+ height: 100px;
+}
+#two {
+ background-color: green;
+ width: 80px;
+ height: 80px;
+}
+#one {
+ background-color: white;
+ width: 60px;
+ height: 60px;
+}
+```
+
+* HTML
+
+```
+
3
+
2
+
1
+
+
+```
+
+* JavaScript
+
+```
+var myEventHandler = function(event){
+ alert("target: " + event.target.id + " - this: " + this.id);
+}
+
+var divs = document.getElementsByTagName("div");
+
+for(var i = 0; i < divs.length; i++){
+ divs[i].addEventListener("click", myEventHandler);
+}
+```
+
+* try adding a third parameter of `true` to the `addEventListener` method
+ * how does the output change?
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/functions.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/functions.md
new file mode 100644
index 000000000..33a76e7b9
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/functions.md
@@ -0,0 +1,97 @@
+# functions.md
+* functions are first-class citizens
+ * they can be passed, returned, and stored just like any other value
+* Function inherits from Object and can store name/value pairs
+* What JavaScript calls function, other language call lambda
+ * JavaScript was the first lambda based language to go mainstream
+* function statement is shorthand for var statement
+ * `function foo(){}` *expands to* `var foo = function(){}`
+* no function overloading
+ * number of parameters can vary
+
+
+
+### scope
+* there is a global scope
+* functions have scope
+* nothing else has scope
+ * there is no block scope in JavaScript
+ * this means you should define your variables at the beginning of the function
+
+### closure
+* this is how we achieve encapsulation
+* basically a function in a function
+
+```
+function abc() {
+ function def() {}
+}
+```
+
+* inner function retains its *environment*
+
+```
+function abc () {
+ var str = "hello from outer function";
+ function def() {
+ console.log(str);
+ }
+ return def;
+}
+
+abc()();
+```
+
+* Challenge: write an `add` function such that `add(3,4)` and `add(3)(4)` both return `7`
+
+
+### method
+* a method is a function that belongs to an object
+
+### invocation
+* if a function is called with too many arguments, the extra arguments are ignored
+* if a function is called with too few arguments, the missing values will be undefined
+* no type checking on parameters
+* every function gets an `arguments` parameter
+* every function gets a `this` parameter, but what it points to depends on the **invocation form**
+ * that means that `this` is bound at invocation time
+
+### invocation forms
+* function form `someFn(args)`
+* method form `someObj.someFn(args)` or `someObj["someFn"](args)`
+* constructor form `new someFn(args)`
+* apply form `someFn.apply(someObj, [args])`
+
+### function form
+* `this` points to the global object
+* that is not very useful
+* cause of many bugs
+
+### method form
+* `this` points to the object which was used during method invocation
+
+```
+someObj.someFn(); //inside of someFn, 'this' will point to someObj
+```
+
+### constructor form
+* when a function is called with the `new` operator, a new object is created and assigned to `this`
+* if there is no explicit return statement, then `this` will be returned
+* **best practice** is to capitalize functions that are meant to be constructors
+ * see below example for why
+
+```
+var Person = function(name, age) {
+ this.name = name;
+ this.age = age;
+}
+
+var john = Person("John", 28);
+console.log(john);
+```
+
+
+### apply form
+* looks weird
+* allows you to invoke a method while dynamically setting the object
+* `this` points to the object that you pass into the `apply` method
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/html.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/html.md
new file mode 100644
index 000000000..c61e9af86
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/html.md
@@ -0,0 +1,59 @@
+# html
+* Hypertext Markup Language
+* meant for research papers
+* HTML displays data
+ * XML describes data
+* [w3schools html tutorial](http://www.w3schools.com/html/default.asp)
+
+minimal html page
+
+```html
+
+
+
+```
+
+head and body
+
+```html
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+display person data
+
+```html
+
+
+
+
+
People
+
+
+
+
name
+
age
+
+
+
John
+
30
+
+
+
Amy
+
28
+
+
+
+
+
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/inheritance.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/inheritance.md
new file mode 100644
index 000000000..b97cefe1e
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/inheritance.md
@@ -0,0 +1,41 @@
+# inheritance
+* JavaScript has Prototypal inheritance
+ * no classes in JavaScript
+* this means that objects inherit directly from other objects
+* the parent object is called the `prototype`
+* every object has a property called `__proto__` that points to its prototype
+* JavaScript has **method overriding**
+
+```
+var str = "dog";
+console.log(str.__proto__);
+```
+
+* example: all strings inherit from `String.prototype`
+
+```
+String.prototype.hello = function() {
+ console.log("hello from string");
+}
+
+var str = "dog";
+str.hello();
+```
+
+* example: inheritance with custom objects
+
+```
+var Person = function() {
+ this.hello = function() {
+ console.log("hello from person");
+ }
+}
+
+var Student = function() {
+ this.__proto__ = new Person();
+}
+
+var john = new Student();
+console.log(john.__proto__);
+john.hello();
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/intro.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/intro.md
new file mode 100644
index 000000000..a4e685d43
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/intro.md
@@ -0,0 +1,5 @@
+# intro
+* JavaScript is widely used in browsers
+* while running in the browser, the global object is called `window`
+* the Document Object Model (DOM) is a tree of JavaScript objects that is used to render a view
+* we can use JavaScript to manipulate the DOM and create dynamic applications
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/jquery.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/jquery.md
new file mode 100644
index 000000000..4a86e0c5e
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/jquery.md
@@ -0,0 +1,40 @@
+# jQuery
+* JavaScript library
+* simplifies and adds additional functionality to JS
+* basic syntax is `$(selector).action()`
+ * `$` defines/assesses jQuery
+ * the action is what is to be performed on the elements
+* only a single global object
+ * `$` and `jQuery` point to the same global object
+* the `jQuery` object is actually a function
+ * when you invoke the function, it traverses the DOM
+ * the `jQuery` function has methods like `ajax`
+* jQuery uses CSS selectors
+ * Allow you to select and manipulate HTML elements
+ * `$([element])`
+ * `$(.[class])`
+ * `$(#[id])`
+* The Document Ready Event
+ ```
+ $(document).ready(function(){
+ //jQuery method here
+ });
+ ```
+ * This exists to prevent any jQuery code from running before the document is finished loading
+ * Ex of actions that can fail if methods are run before doc is fully loaded - trying to hide an element that hasn’t been created yet
+
+* the `ajax` method takes in an object
+ * this object has members to configure the request
+ * no more worrying about what browser you are in
+ * this is one step... remember with plain JavaScript it was four steps
+
+```
+$.ajax({
+ method : "get",
+ url : "someUrl",
+ success : function(){},
+ error : function(){},
+ complete : function(){}
+});
+```
+
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/json.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/json.md
new file mode 100644
index 000000000..d69add344
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/json.md
@@ -0,0 +1,63 @@
+# json
+* [reference](http://www.json.org/)
+* JavaScript Object Notation
+* created by Douglas Crockford
+* a way to represent data in a language agnostic way
+ * similar to xml, yaml, csv
+* JSON was inspired by the way JavaScript represents objects
+ * JSON and JavaScript objects are not the same thing
+* JSON restrictions
+ * 'undefined'
+ * functions
+ * numbers must be base 10
+ * names must have quotes
+
+### JSON document
+* object `{key : value, key : value}`
+
+### Keys
+* Must be strings
+
+### Values
+* string
+* number
+* true / false
+* array `[value, value, value]`
+* object `{key : value, key : value}`
+* null
+
+```
+{}
+```
+
+```
+{
+ "name" : "John"
+}
+```
+
+```
+{
+ "colors": ["blue", "green", 42]
+}
+```
+
+```
+{
+ "make": "Jeep",
+ "model": "Wrangler",
+ "year": 2004
+}
+```
+
+
+```
+{
+ "name" : "John",
+ "car": {
+ "make": "Jeep",
+ "model": "Wrangler",
+ "year": 2004
+ }
+}
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/manipulating-dom.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/manipulating-dom.md
new file mode 100644
index 000000000..ecc63cc9b
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/manipulating-dom.md
@@ -0,0 +1,20 @@
+# manipulating the DOM
+
+### finding elements
+* `document.getElementById(id)`
+* `document.getElementsByTagName(name)`
+* `document.getElementsByClassName(name)`
+
+### changing elements
+* `element.innerHTML = new html content`
+* `element.attribute = new value`
+* `element.setAttribute(attribute, value)`
+* `element.style.property = new style`
+
+### adding / deleting elements
+* `document.createElement(element)`
+* `element.removeChild(element)`
+* `element.appendChild(element)`
+* `element.replaceChild(element)`
+* `document.write(text)`
+
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/objects.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/objects.md
new file mode 100644
index 000000000..988fa28c1
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/objects.md
@@ -0,0 +1,72 @@
+# objects
+* collection of name/value pairs
+ * a **name** can be any string
+ * a **value** can be any value *except undefined*
+* two ways to create an object
+ * object literal `{}` (preferred)
+ * constructor (ok, but should not use `new Object()`)
+
+```
+var someObject = {};
+
+var john = {
+ "name" : "John",
+ "age" : 28
+};
+```
+
+```
+function Person(name, age) {
+ this.name = name;
+ this.age = age;
+}
+
+var john = new Person("John", 28);
+```
+
+* `:` separates names and values
+* `,` separates pairs
+* as you can see, objects in JavaScript are basically hash tables
+* no hash nature is visible (no hash codes or rehash methods)
+* members can be accessed with dot notation `object.member` or subscript notation `object["member"]`
+
+
+### maker functions
+* a function that creates and returns an object
+* useful if it is difficult or cumbersome to create an object
+ * constructors are an alternative solution
+
+```
+function makePerson(name, age) {
+ var person = {
+ "name" : name,
+ "age" : age
+ };
+ return person;
+}
+
+var john = makePerson("John", 28);
+
+```
+
+### object augmentation
+* objects are very dynamic
+
+```
+var obj = {};
+
+ //obj.x is undefined
+
+obj.x = 7;
+
+ //obj.x is 7
+
+delete obj.x;
+
+ //obj.x is undefined
+```
+
+
+
+
+[arrays](arrays.md) and [functions](functions.md) inherit *Object*
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/operators.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/operators.md
new file mode 100644
index 000000000..1ae49428f
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/operators.md
@@ -0,0 +1,115 @@
+# Operators
+* arithmetic + - * / %
+* comparison == != <> <= >= === !==
+* logical && || !
+* bitwise & | ^ >> >>> <<
+* ternary ?:
+
+### arithmetic
+* be careful if you need precision
+
+### comparison
+* one note about **equality** operators (==, !=) and **identity** operators (===, !==)
+
+```
+var x = 5 ;
+var y = "5";
+
+x == y //true
+x === y //false
+```
+
+* equality operators (==, !=) do **type coersion**
+* **always use identity operators (===, !==)
+
+### logical
+* because values are truthy or falsy, we can use logical operators in neat ways
+* the result of a logical operator does not need to be `true` or `false`
+
+* && is called the **guard operator**
+ * if first operand is *truthy*, then return **second** operand
+ * if first operand is *falsy*, then return **first** operand
+
+```
+
+//long version
+if(a) {
+ return a.member;
+}else {
+ return a;
+}
+
+//using guard operator
+return a && a.member;
+
+```
+
+* || is called the **default operator**
+ * if first operand is *truthy*, then return **first** operand
+ * if first operand is *falsy*, then return **second** operand
+
+```
+
+var language = input || "en";
+
+```
+
+* basic examples
+
+```
+false || false //false
+true || false //true
+false || true //true
+true || true //true
+
+false && false //false
+true && false //false
+false && true //false
+true && true //true
+```
+
+* other examples
+
+```
+null || 0 //0
+0 || null //null
+1 || 2 //1
+2 || 1 //2
+
+null && 0 //null
+0 && null //0
+1 && 2 //2
+2 && 1 //1
+```
+
+* Can you explain why boolean primitives are better to use than Boolean objects?
+
+
+### bitwise
+* need integers to use bitwise operators
+* remember numbers in JavaScript are 64 bit floating point numbers
+* so when we use bitwise operators, it looks something like:
+ * convert 64 bit floating point to 32 bit integer
+ * perform bitwise operaton
+ * convert 32 bit integer back to 64 bit floating point
+* **bad practice** - slow and tough to read
+
+### ternary
+* short and sweet
+
+```
+var x = true ? 1 : 0; //1
+var y = false ? 1 : 0; //0
+```
+
+* bad practice because it is tough to understand
+
+```
+//what is x?
+
+var a = false;
+var b = true;
+var c = true;
+var d = false;
+var x = a || b ? c && d ? 1 : 2 : 3;
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/other.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/other.md
new file mode 100644
index 000000000..ab9e37f08
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/other.md
@@ -0,0 +1,68 @@
+# other
+
+### garbage collection
+* JavaScript has a garbage collector
+
+### use strict
+* put string literal `"use strict"` at the top of a scope to enforce rules
+
+```
+"use strict"
+
+var someFn = function() {
+ "use strict"
+
+}
+
+```
+
+### typeof
+
+| typeof | result |
+|:--------------:|:------------:|
+| object | "object" |
+| function | "function" |
+| array | **"object"** |
+| number | "number" |
+| string | "string" |
+| boolean | "boolean" |
+| null | **"object"** |
+| undefined | "undefined" |
+
+
+### eval
+* can evaluate a string as code
+* do not do this
+
+### build-in wrapper types
+* JavaScript copied Java wrapper types: Integer, Boolean, etc.
+* do not use these
+
+### global
+* there is always a global object
+* it does not have a name, but it is there
+* when JavaScript is running in a browser, the global object does have a name: `window`
+
+### global variables are evil
+* use of global namespace must be minimized
+
+### Date
+* there is a date object
+
+### RegEx
+* we have regular expressions
+
+### threads
+* language is neutral on threads
+* most implementations do not have threads
+
+### exception handling
+* `throw`, `try` and `catch` statements
+* 7 built in errors
+ * EvalError
+ * InternalError
+ * RangeError
+ * ReferenceError
+ * SyntaxError
+ * TypeError
+ * URIError
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/values.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/values.md
new file mode 100644
index 000000000..262d13806
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/values.md
@@ -0,0 +1,69 @@
+# values
+* numbers
+* strings
+* booleans
+* null
+* undefined
+* NaN
+* **objects**
+
+### Loosely Typed
+* Any of these types can be stored in a variable, or passed as a parameter to any function
+* the language is not *untyped*
+
+### numbers
+* 64 bit floating point
+* floating point numbers are not accurate
+```
+var x = 0.3 - 0.2; // does not equal 0.1
+```
+
+### strings
+* 0 or more 16 bit characters
+* "" same as ''
+* no separate character type
+* immutable
+* == similar strings are equal
+* UCS-2, not UTF-16
+* string.length
+* String(value) *converts value to a string*
+
+### booleans
+* true
+* false
+* note: values can be *truthy* or *falsey*
+
+### truthy and falsy
+* falsy values
+ * false
+ * null
+ * undefined
+ * "" *empty string*
+ * 0
+ * NaN
+* all other values are truthy (including all objects)
+
+### null and undefined
+* *null* is a value that is not anything
+* *undefined* is not even that...
+
+
+
+* You can assign a value to be null
+* *undefined* is the default value for variables, parameters, nonexistent members, etc.
+```
+var x; //undefined
+var y = null; //null
+```
+
+### NaN
+* *not a number*
+
+```
+var x = 0/0; //NaN
+```
+
+
+
+
+
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/js/watch-out.md b/Darius_Moomivand_Code/Weeks3-4/docs/js/watch-out.md
new file mode 100644
index 000000000..d0732c199
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/js/watch-out.md
@@ -0,0 +1,47 @@
+# things to watch out for
+
+### semicolon injection
+* you need semicolons, however JavaScript will try to help you out by injecting semicolons if it finds a syntax error
+
+```
+var someFn = function() {
+ return
+ {
+ name : "John",
+ age : 28
+ }
+}
+
+var john = someFn();
+console.log(john);
+
+```
+
+* the battle of where to put the starting curly brace is over!
+
+### hoisting
+* JavaScript *hoists* variable declarations to the top of their respective scopes
+
+```
+var someFn = function() {
+ str = "ALLO!";
+ console.log(str);
+ var str;
+}
+
+someFn();
+
+```
+
+### implied globals
+* if you use a variable and do not declare it, JavaScript assumes it must be a global variable
+
+```
+var someFn = function() {
+ str = "allo";
+ console.log(str);
+}
+
+someFn();
+console.log(str);
+```
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-exercise-1.md b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-exercise-1.md
new file mode 100644
index 000000000..dc80a7e70
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-exercise-1.md
@@ -0,0 +1,9 @@
+# A List of Authors
+
+Use what you have learned in `ng-notes-1` and `ng-notes-2` to build a page that has a heading (h1) that says: "Angular". Below it should be another heading (h2) that says: "# Authors", where # is replaced with the number of authors in a list. Finally, below this heading, include an unordered list that displays a list ite containing the name of each author in the authors list.
+
+You should use the nG CLI to generate component and a service that are both used to accomplish this task.
+
+# Solution
+
+##### The solution to this exercise can be found in the files within the *authors-component* folder and *authors.service.ts* inside of the ng-demo project
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-exercise-2.md b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-exercise-2.md
new file mode 100644
index 000000000..1a2f63f33
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-exercise-2.md
@@ -0,0 +1,7 @@
+# Title Casing
+
+In the template for `AppComponent`, includes an input field and a area underneath it where text typed into the input field is displayed in real-time. Also, the casing of the text entered should be title casing. Title casing means that every word of the title will be capitalized, except for prepositions - unless it is the first word of the title. For example, here is a movie title with proper casing: "The Rise of the Planet of the Apes".
+
+# Solution
+
+##### The solution to this exercise can be found in the files within the *title-pipe.ts*, *app.component.ts*, and *app.component.html* files inside of the ng-demo project
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-exercise-3.md b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-exercise-3.md
new file mode 100644
index 000000000..da357ad35
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-exercise-3.md
@@ -0,0 +1,9 @@
+# Create a Favorite Component
+
+Using the nG CLI, create a component called `FavoriteComponent` that is rendered to the DOM as a star glyph icon. You will need to use some Bootstrap classes to properly render this icon: `glyphicon`, `glyphicon-star`, and `glyphicon-star-empty`. In order to have access to these you will need to include the following link within the head of the `index.html` file:
+
+
+
+Notice that we are using Bootstrap 3, instead of the new Bootstrap 4. This is because Bootstrap 4 got rid of the glyphicon library.
+
+The way this component should work, is that it should start off as an empty star, and when clicked by the user it should toggle between empty and filled. Good luck!
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-notes-1.md b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-notes-1.md
new file mode 100644
index 000000000..3ca2b21da
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-notes-1.md
@@ -0,0 +1,233 @@
+# What is Angular?
+
+A framework for building client applications in HTML, CSS, and JavaScript/TypeScript.
+
+## Why Angular?
+### Why not JavaScript or jQuery?
+
+Sure we can, and that is actually how many web applications are built. However as our applications get more complex, vanilla JS/jQ code becomes harder to maintain.
+
+Angular (nG) provides us with a way to properly structure or code, without having to understand complex JS design patterns (i.e. Revealing Module or Prototype patterns)
+
+Applications built with JS/jQ are also more difficult to test, and nG simplifies this task.
+
+#### Benefits of nG
+
+* Gives our applications a clean structure
+* Includes a lot of reusable code
+* Makes our applications more testable (both unit and integration testing)
+
+
+# Architecture of Angular applications
+
+A lot of applications have at least two parts: a front-end and a back-end. The front-end,
+or client, is the part that runs in the web browser and is what user interacts with (UI). We can use HTML, CSS, TS, and nG to build our front-end.
+
+The back-end sits on a web server, or multiple web servers hosted on the cloud. It is responsible for
+storing the data and any kind of processing (business logic). Our front-end talks to the back-end to
+get or persist data through an HTTP service (a collection of endpoints that are accessible via the
+HTTP protocol).
+
+#### Back-end:
+* Data + APIs
+* Business Logic
+
+#### Front-end:
+* HTML templates
+* Presentation Logic
+
+
+
+# Setting Up the Development Environment (Our first Angular App)
+
+1) Install the latest version of Node.js.
+
+* Node.js is a runtime environment for executing JS code outside of the browser. (nG apps require
+ Node.js version 6.9+)
+
+* Link: [Node.js](https://nodejs.org/en/)
+
+* Check for success:
+ * In your terminal type the following command to see your installed version of Node.js:
+
+ `node --version`
+
+2) With Node.js installed, use Node Package Manager (NPM) to install third-party libraries. In our
+case we use it to install the Angular Command Line Interface (CLI), using the following command:
+
+`npm install -g @angular/cli`
+
+* The nG CLI is a command-line tool that is used to create our nG project and its various services, components, etc.
+
+* The `-g` installs our nG CLI globally. Without it, the nG CLI will only be installed in the current folder and will not accessible anywhere else.
+
+* The installation process takes a minute.
+
+* Check for success:
+
+ * In the terminal type the following command to see the installed versions of the nG CLI, Node.js, and your machine's OS:
+
+ `ng --version`
+
+3) To create a new nG project type the following command into the terminal:
+
+`ng new hello-world`
+
+* This generates a lot of files for us and uses NPM to download any third-party libraries that are required.
+
+4) Once the project is created, we can launch it on a Node server using the following command:
+
+`ng serve`
+
+* By default, our live development server is deployed on localhost port 4200.
+
+
+
+# Structure of an Angular Application
+
+* e2e
+ * End-to-end tests are automated tests that simulate a real user's interaction with our web page
+
+* node_modules
+ * the storage location of all of the third-party libraries our nG application depends upon
+ * only used for development
+
+* src
+ * the actual source code of our nG application
+ * contains the following:
+
+ * app
+ * contains a module and a component
+
+ * assets
+ * storage location for static assets for the web page (images, audio, etc.)
+
+ * environments
+ * contains configuration settings for different environment
+ * contains one file for the production environment and one for the development environment
+
+ * favicon.ico
+ * icon displayed in the browser tab
+
+ * index.html
+ * a simple HTML file that contains our nG application
+ * has no references to external stylesheet, since they will be added dynamically later
+
+ * main.ts
+ * starting point of the nG application
+ * location where we bootstrap the application's main module using the statement:
+
+ `platformBrowserDynamic().bootstrapModule(AppModule);`
+
+ * polyfills.ts
+ * imports some scripts required to run nG, since nG framework uses features of JS that are
+ not in the current version of JS.
+
+ * style.css
+ * the location where we can add global styles for the application (each component can have
+ its own styles, as well)
+
+ * test.ts
+ * used to set up a testing environment
+
+ * .angular-cli.json
+ * configuration file for the nG CLI
+
+ * .editorconfig
+ * used to ensure that all developers working on a project have their editors configured in the
+ same manner
+
+ * karma.conf.js
+ * another configuration file for a test runner known as Karma, used to testing JS code
+
+ * package.json
+ * a standard file that all Node projects have
+ * contains a list of dependencies and the versions used (needed for production)
+ * contains a list of development dependencies and the versions used (needed for developers only)
+
+ * protractor.conf.js
+ + a configuration file used for the e2e testing framework Protractor
+
+ * tsconfig.json
+ + a settings file for the TS compiler
+
+ * tslint.json
+ + includes settings for tslint, a static analysis tool for TS code (checks TS code for readability,
+ maintainability, and functionality)
+
+
+
+# What is Webpack?
+
+nG CLI uses a tool known as Webpack, which is a build automation tool. Webpack is responsible for gathering scripts and stylesheets, bundling them, then minifying them for optimization.
+
+Common bundles managed by the nG CLI (These bundles are injected into the index.html):
+
+* polyfills.bundle.js (necessary non-standard JS features)
+* main.bundle.js (nG source code)
+* styles.bundle.js (stylesheets)
+* vendor.bundle.js (third-party dependencies)
+* inline.bundle.js (Webpack loader)
+
+
+# Angular Version History
+
+* AngularJS
+ * introduced in 2010, as a JS framework for building client applications
+
+* Angular2
+ * introduced in September 2016
+ * written in TS
+
+* Angular4
+ * introduced in March 2017
+ * still written in TS
+ * new features (not all inclusive):
+ * changes to nG Routing
+ * support for animations (without writing functions)
+ * changes and additions to built-in directives
+ * Angular Universal (running nG apps outside of the browser and on a web server)
+
+
+* Angular5
+ * introduced in November 2017
+ * still written in TS
+ * new features (not all inclusive):
+ * BuildOptimizer
+ * Additional features for Angular Universal
+ * HttpClient (officially replaces the deprecated Http)
+ * Compiler improvements
+ * CLI v1.5
+ * new Router lifecycle events
+
+
+* Angular6
+ * introduced in April 2018
+ * still written in TS
+ * new features (not all inclusive):
+ * Webpack v4
+ * support for RxJS 6 library
+ * new nG CLI commands (`ng add`, `ng update`, etc.)
+
+## Why no Angular3?
+
+Angular consists of a few different libraries that are distributed as separate packages. Before Angular4 was released, the latest versions of these libraries were:
+
+ @angular/core v2.3.0
+ @angular/compiler v2.3.0
+ @angular/http v2.3.0
+ @angular/router v3.3.0
+
+Notice that the nG router package's version was out of sync with the other nG packages. In order to get all of the packages back in sync, the nG development team decided to skip an Angular3 release, and go straight to Angular4. Although technically, the version number was officially dropped from the name to help emphasize that there are only two version of Angular: AngularJS and Angular. The latter being all versions of Angular from v2 and beyond.
+
+
+# Pulsecheck: Assess Knowledge
+
+1. What is Angular?
+2. When building client apps with Angular, where is the application data stored and processed?
+3. When designing the architecture of our applications, what kind of logic is implemented on the client?
+4. How can we create a new Angular project using the Angular CLI?
+5. What is Webpack?
+6. What is the difference between AngularJS and Angular?
+7. Why was there no Angular3?
+
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-notes-2.md b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-notes-2.md
new file mode 100644
index 000000000..16dacd4e0
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-notes-2.md
@@ -0,0 +1,144 @@
+# Angular Fundamentals
+
+This set of notes is going to cover the fundamentals of Angular (nG) to set us on the right path to build great nG applications. Before continuing you should at least have a basic understanding of Node.js, TypeScript (TS), Webpack, and the general structure of an nG application. The goal of this section is to cover the following topics:
+
+* Components
+* Templates
+* Directives
+* Services
+
+
+# Building Blocks of Angular Applications
+
+Now that we have some basic familiarity with nG, lets look at the building blocks of all nG applications. At the heart of every nG application are one or more *components*. Real-world applications have dozens, sometimes hundreds of components.
+
+A component encapsulates the data, the HTML markup, and the logic of the view. Imagine we are building a website using nG. Our entire page could be viewed as one large component (`AppComponent`) that is broken into smaller sub-components (`NavComponent`, `SidebarComponent`, etc.). A key feature of our components is that they are reusable, providing a consistency in not only the look and feel of our application, but also its functionality. Additionally, the idea of using components means that we can work on smaller, more maintainable pieces of our application.
+
+All nG applications have a root component, known as the `AppComponent`. All other components branch outward from this root component in a tree-like structure. In nG, there is also a concept of *modules* which are groupings of related components. All nG applications have at least one module, known as the `AppModule`. As our applications become larger, it may become appropriate to break our application up into smaller, more maintainable modules.
+
+
+## Components
+
+There are basically three steps that you need to follow in order to use a component:
+
+1) Create the component
+
+2) Register the component in a module
+
+3) Add an element in the HTML markup
+
+We have two options to choose from when it comes to creating nG components. We can either create them ourselves manually, or we can use the nG CLI to generate them automatically. The first way we will look at this is by creating them manually.
+
+Inside of the `src` folder of our demo application (ng-demo), we will add a new file and give it the name: `courses.component.ts`. This is the naming convention you will use when creating components in nG. If your component's name has more than one word, then separate them using a hyphen.
+
+#### See *courses.component.ts* file in ng-demo for more notes on manually creating a component.
+
+
+The other, and more convenient method of creating components in nG is by utilizing the nG CLI. The following command can be used to generate a component:
+
+ ng generate component course
+
+The shorthand syntax for the above command is as follows:
+
+ ng g c course
+
+Notice that the nG CLI automatically creates a folder containing the HTML, CSS, and TS files related to our new component. It also, automatically registers the newly created component with the module we are creating it within (in this case, the AppModule). Exploring the generated files reveals that the nG CLI has automatically generated boilerplate code for us.
+
+## Templates
+
+We already know that a component encapsulates the data, the logic, and the HTML markup for a view. Templates are the aspects of our component that represent its presentation logic. We can use data-binding techniques such as interpolation, class binding, style binding, and two-way binding to wire the internal logic of our component to the view.
+
+#### See *courses.component.ts* file in ng-demo for more notes on templates
+
+
+## Directives
+
+Directives are used to manipulate the Document Object Model (DOM). We can use directives to create elements, remove elements, change the class, styling, or attributes of an element. Additionally, we can create our own custom directives that have user-defined functionalities.
+
+Directives _extend_ the behavior of HTML, enabling you to create custom HTML elements, attributes, and classes with functionality specific to an application. nG provides many built-in directives which provide the capability to interact with form elements, bind data in a component to the view, and interact with browser events.
+
+### Understanding Directives
+
+Directives are a combination of nG template marup and supporting TS code. nG directive markups can be HTML attributes, element names, or CSS classes. The TS directive code defines the template data and behavior of the HTML elements.
+
+The nG compiler traverses the template DOM and compiles all of the directives. Then it links the directives by combining a directive with a scope to produce a new live view. The live view contains the DOM elements and functionality defined in the directive.
+
+### Using Built-in Directives
+
+Much of the nG functionality that is needs to be implemented in HTML elements is provided through built-in directives. These directives provide a wide variety of support for nG applications. nG directives fall into one of the three categories:
+
+* *Component:* A directive with a template
+* *Structural* A directive that manipulates the DOM
+* *Attribute* A directive that manipulates the appearance or behavior of a DOM element
+
+#### Structural Directives
+
+We have already discussed nG components, so we will move to *structural directives*. nG includes many built-in directives that dynamically update, create, and remove elements from the DOM. These directives create the layout, look, and feel of an application. Below is a list of the built-in structural directives:
+
+* `ngFor`
+ * used to create a copy of a template for each item within an iterable object
+
+* `ngIf`
+ * used to display a template if a certain condition is met, otherwise remove it
+
+* `ngSwitch`
+ * displays a template based upon the value passed to it, a default template (`ngSwitchDefault`) is provided if the value given does not match any specified cases (`ngSwitchCase`)
+
+##### See *structural-directive-demo* folder in ng-demo for more notes on structural directives
+
+
+#### Attribute Directives
+
+nG attribute directives modify how HTML elements look and behave. The are injected straight into the HTML and dynamically modify how the user interacts with an HTML segment. Attribute directives are so named because they loop like normal HTML attributes. Below is a list of the built-in nG attribute directives:
+
+* `ngModel`
+ * watches a variable for changes and then updates display values based on those changes
+
+* `ngForm`
+ * creates a form group and allows it to track the values and validation within that form group. By using `ngSubmit`, you can pass the form data as an object to the submission event.
+
+* `ngStyle`
+ * updates the styles of an HTML element
+
+* `ngClass`
+ * updates the class of an HTML element
+
+##### See the *attribute-directive-demo* folder in ng-demo for more notes on attribute directives
+
+##### See *courses.component.ts* file in ng-demo for more notes on directives in general
+
+
+## Services
+
+In our `CoursesComponent`, we have hard-coded our list of courses into the component's logic. In real-world applications, this list of courses would be something that is retrieved from the server. We could include the logic for calling an HTTP endpoint in our component, but there are some problems with this approach. First, the addition of this logic will tightly couple our component to that HTTP endpoint, this will make unit testing much more difficult. Second, this logic is likely to be reused elsewhere in our application and we would not want to keep writing it over and over each place it is necessary. Lastly, by including the logic to call an HTTP endpoint we would violate the principle that our component should only be responsible for presentation logic.
+
+Our solution, instead, should be to create a *service* with handles this extra functionality. We will use the nG CLI to automatically generate a service that will handle the retrieval of courses. The below command will do this:
+
+ ng generate service courses
+
+The shorthand syntax for this is:
+
+ ng g s courses
+
+Services in nG do not get the `@Component` decorator, like our components do. Instead they can optionally include the `@Injectable` decorator which will allow nG to inject other services into the current service, but only if they are included in its constructor. Services can injected into components and other services as a dependencies. Doing this will allow us to keep our components and the services they use loosely coupled, and this is known as *dependency injection*.
+
+The purpose of a service to provide a concise bit of code that performs a specific task. A service can do something as simple as providing a value definition, or as complex as providing full HTTP communication to a web server.
+
+A service provides a container for reusable functionality that is readily available to nG applications. Services are defined and registered with the dependency injection mechanism in nG. Which allows us to inject our services into modules, components, and even other services.
+
+nG comes with several built-in services that are included in the nG module, using dependency injection. Once included within a module, services can be used throughout an application. Below are the most commonly used built-in services:
+
+* `HttpClient`
+ * replaces the deprecated `http` service
+ * provides a simple-to-use functionality to send HTTP request to the web server or other services
+
+* `forms`
+ * provides a service that allows for dynamic and reactive forms with simple form validation
+
+* `router`
+ * provides navigation between views and between sections within views
+
+* `animate`
+ * provides animation hooks to link into both CSS and JS-based animations
+
+##### See *courses.service.ts* file in ng-demo for more notes on services
\ No newline at end of file
diff --git a/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-notes-3.md b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-notes-3.md
new file mode 100644
index 000000000..330e4ec7a
--- /dev/null
+++ b/Darius_Moomivand_Code/Weeks3-4/docs/ng/ng-notes-3.md
@@ -0,0 +1,331 @@
+# Displaying Data and Handling Events
+
+In this section, we will look at displaying data and handling events. The knowledge goals of this section are:
+
+* Display data
+* Apply classes/styles dynamically
+* Format data using pipes
+* Handle events
+
+
+# Data Binding
+
+One of the best features of nG is the built-in *data binding*. Data binding is the process of linking data from a component with what is displayed in a web page. When data in the component changes, the UI rendered to the user is automatically updated. nG provides a very clean interface to link the model data to elements in a web page.
+
+
+## Understanding Data Binding
+
+Data binding means linking data in an application with the UI element that is rendered to the user. When data is changed in the model, the web page is automatically updated. This way, the model is always the only source for data represented to the user, and the view is just a projection of the model. The glue that puts the view and the model together is data binding.
+
+There are many ways in nG to use data binding to make an application look and actin different ways. The following is a list of the types of data binding available in nG:
+
+* Interpolation
+ * uses the double curly braces `{{ }}` to get values directly from the component
+ * Syntax: `{{ title }}`
+
+* Property binding
+ * used to set the property of a DOM object
+ * Syntax: ``
+
+* Event binding
+ * used to handle user inputs and actions
+ * Syntax: ``
+
+* Attribute binding
+ * allows the setting of attributes of a DOM object
+ * Syntax: ``
+
+* Class binding
+ * allows the setting of CSS class names to a DOM object
+ * Syntax: ``
+
+* Style binding
+ * used to create inline CSS styles for a DOM object
+ * Syntax: ``
+ * Syntax: ``
+
+* Two-way binding
+ * used with data entry forms to receive and display data.
+ * Syntax: ``
+
+
+### Property Binding
+
+Property binding is a type of data binding that is used to dynamically set the DOM properties of an HTML element. To understand how this works, let's compare it to something we are already familiar with: string interpolation. Consider the following:
+
+
+
+This is pretty straightforward. We are setting the `src` attribute equal to whatever the value of the component's `imageUrl` field is. Now, compare this to code that does the *exact* same thing, but using property binding:
+
+
+
+This syntax is actually cleaner than it was before using interpolation. The nG compiler scans the DOM and sees the `src` attribute encapsulated within square brackets, and it knows that the value assigned to it is going to be a field of the component.
+
+It is important to note that property binding is one-way, meaning that changes in the component will be reflected in the DOM, but any changes made on the DOM will not reflect in the component.
+
+
+### Attribute Binding
+
+Attribute binding allows the setting of attributes of a DOM object. To fully grasp attribute binding, it is important to understand the difference between HTML and the DOM. The DOM is model of objects that represent the structure of a document. It is essentially a tree of documents in memory. HTML is the way that we repesent the DOM in text. When you browser parses HTML it is actually creating DOM objects in memory that represent the structure of the webpage.
+
+Most of the attributes of HTML elements have a one-to-one mapping to properties on DOM objects. There are a few exceptions to this rule, though. For instance, the HTML element `
` has an attribute `colspan`. However, there is no `colspan` DOM property. Likewise, we can set the text content of a HTML element like `
` using the DOM property `textContent`. There is no equivalent HTML attribute for this DOM property.
+
+In order to get around these boundary cases, we can alter the same syntax we used with property binding just a bit. For example, let's create a table with a row that contains data where the `colspan` attribute is set dynamically to a field within the component.
+
+
+
+
+
+
+
+Since there is no DOM property equivalent to the HTML attribute `colspan` we need to include the `attr.` prefix to let nG know that it is working with an HTML attribute rather than a DOM property.
+
+
+### Class Binding
+
+There are sometimes where we may want to add additional classes to an element based upon some condition. To do this, we do a variation of property binding:
+
+