Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
66fca45
Darius Moomivand add README.md
Jul 30, 2018
43a2a72
Add files via upload
PowerfulProgramming Jul 31, 2018
28be442
Add files via upload
PowerfulProgramming Jul 31, 2018
35125d2
first commit on new computer
PowerfulProgramming Aug 3, 2018
846536d
pulling week 1 code
PowerfulProgramming Aug 3, 2018
c2727ff
pushing maven test
PowerfulProgramming Aug 3, 2018
18584dc
added reverse string
PowerfulProgramming Aug 4, 2018
0db1d88
corrected reverseString added Palindrome
PowerfulProgramming Aug 4, 2018
731680a
Added Factorial Solution
PowerfulProgramming Aug 5, 2018
3db9bbd
Added comments to Factorial and Palindrome
PowerfulProgramming Aug 5, 2018
b807715
Added Even and Substring problems
PowerfulProgramming Aug 5, 2018
eb8f311
Added Comparator and Even problems
PowerfulProgramming Aug 5, 2018
018a4ab
Added SortEmployees and ListOfPalindromes
PowerfulProgramming Aug 5, 2018
b640efa
Added ArrayListPrime solution
PowerfulProgramming Aug 5, 2018
5893ebd
Added FindFloats problem
PowerfulProgramming Aug 5, 2018
fbe5555
Added solutions for problem EvenLoop and Triangle
PowerfulProgramming Aug 5, 2018
08b4c00
Added solution to Switch problem
PowerfulProgramming Aug 5, 2018
f4e4aaf
Added solutions for the Switch and Calc problems
PowerfulProgramming Aug 5, 2018
b9b75f7
Added solutions for Concrete, Interest and StringCount problems
PowerfulProgramming Aug 5, 2018
50839d8
Added solution for ArrayListManipultion
PowerfulProgramming Aug 5, 2018
bb45d32
Added solution for ReadAFile
PowerfulProgramming Aug 5, 2018
908c5d7
Added SQL inclass work
PowerfulProgramming Aug 7, 2018
0ee5057
Update README.md
PowerfulProgramming Aug 8, 2018
7038a4d
Added pojos
PowerfulProgramming Aug 10, 2018
50bda59
Merge branch 'Darius_Moomivand' of https://github.com/genesisb17/1807…
PowerfulProgramming Aug 10, 2018
537f3bd
Added ConnectionFactory
PowerfulProgramming Aug 10, 2018
af8e36d
Changes made
PowerfulProgramming Aug 12, 2018
8a18049
Added new account functionality
PowerfulProgramming Aug 12, 2018
abac7dd
changes made
PowerfulProgramming Aug 13, 2018
f89287c
Made changes
PowerfulProgramming Aug 15, 2018
5bf4168
Updated Program
PowerfulProgramming Aug 15, 2018
53d81b3
Update
PowerfulProgramming Aug 15, 2018
0ac17cc
Delete Controls.java
PowerfulProgramming Aug 18, 2018
deba9b0
Delete FizzBuzz.java
PowerfulProgramming Aug 18, 2018
4e24fa8
Added VSC
PowerfulProgramming Aug 18, 2018
c0c58de
cleaning up
PowerfulProgramming Aug 18, 2018
fafe15e
adding webpage
PowerfulProgramming Aug 22, 2018
6f985de
updated webpage
PowerfulProgramming Aug 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Darius_Moomivand_Code/DariusM.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"folders": [
{
"path": "Weeks3-4"
}
]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
@@ -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);
}
}

}
}
Original file line number Diff line number Diff line change
@@ -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!" );
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.revature.oopbasics;

public interface Crust {
public void typeCrust();
}
Original file line number Diff line number Diff line change
@@ -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();

}
}
6 changes: 6 additions & 0 deletions Darius_Moomivand_Code/README.md
Original file line number Diff line number Diff line change
@@ -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/
66 changes: 66 additions & 0 deletions Darius_Moomivand_Code/VSC/JS/coreconcepts.js
Original file line number Diff line number Diff line change
@@ -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;
32 changes: 32 additions & 0 deletions Darius_Moomivand_Code/VSC/bank.json
Original file line number Diff line number Diff line change
@@ -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
}
]
}
45 changes: 45 additions & 0 deletions Darius_Moomivand_Code/VSC/bankApp.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Bank</title>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb"
crossorigin="anonymous">

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ"
crossorigin="anonymous"></script>
</head>

<body>

<div id="landingView" class="jumbotron">
<input type="text" hidden="true" placeholder="First Name" id="firstname" class="form-control">
<input type="text" hidden="true" placeholder="Last Name" id="lastname" class="form-control">
<input type="text" placeholder="Username" id="username" class="form-control">
<input type="password" id="password" class="form-control" placeholder="Password">
<button id="logIn" class="btn btn-submit">Log In</button>
<br>
<button id="register" hidden="true" class="btn btn-submit">Register</button>
<br>
<h6 id="showRegView">
<i>Don't have an account? Register here...</i>
</h6>
<span id="message" class="form-control alert alert-danger col-4" hidden="true"></span>
</div>
<div id="homeView" hidden="true">
<h1 id="greeting"></h1>
</div>

<script type="text/javascript" src="../VSC/bankApp.js"></script>
</body>

</html>

Loading