Skip to content

Instantly share code, notes, and snippets.

View paulyorde's full-sized avatar
💭
working

Paul Yorde paulyorde

💭
working
View GitHub Profile
package poker;
public abstract class AbstractPolicy implements GamePolicy {
// map the strategy types - high card = 1, 2pair = 2, etc
public static int highCardLevel = 1;
public static int twoPairLevel = 2;
// protected level - strategies can read it
protected int level;
package hello;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Controller
package review;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
{
"fortunes" : [
"you're gonna get this",
"you're on the right track",
"Confucius says these are most aus·pi·cious times!",
"keep up the good work, you'll be dangerously famous",
"it's like that but better for you!"
]
}
import java.util.Observable;
/**
* Created by origin on 2/6/17.
*/
public class BankAccount extends Observable {
private float balance;
public BankAccount() {}
import java.util.Scanner;
import java.util.function.BiFunction;
public class CalculatorTest {
public static void main(String[] args) {
BiFunction<Float, Float, Float> calculation = null;
Calculator calculator = new Calculator();
Scanner scanner = new Scanner(System.in);
import java.util.Scanner;
public class GpaCalculatorTest {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
float[] gpaScale = { 4.0f, 3.5f, 3.0f, 2.5f, 2.0f };
String[] grades;
float gpa = 0;
int index;
public class Calculator {
public float sum(float firstValue, float secondValue) {
float sum = firstValue + secondValue;
return sum;
}
public float product(float firstValue, float secondValue) {
return firstValue * secondValue;
}
}
@paulyorde
paulyorde / BeerSong.java
Created January 24, 2017 19:02
code for beer song
public class BeerSong {
public static void main(String[] args) {
// TODO Auto-generated method stub
int numBottles = 100;
singStanza(numBottles);
while (numBottles >= 67) {