Skip to content

Instantly share code, notes, and snippets.

View Jakemangan's full-sized avatar

Jake Mangan Jakemangan

View GitHub Profile
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"question3-9": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"enum": [
"Home improvements (General)",
"questionA": {
"type": "object",
"properties": {
"answer": {
"type": "string",
"minLength": 1,
"enum": ["Yes", "No"]
}
}
}
package core;
/*
* Implementation of BrickOrder class, implements Order interface.
*
* BrickOrder class allows storage of reference number and number
* of brings per each order. One BrickOrder class is instantiated
* for each order.
*/
package test;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import core.BrickOrder;
import core.OrderDB;
import core.OrderSystem;
package core;
import java.util.ArrayList;
/*
* OrderDB class stores all of the orders created by OrderSystem
* within an ArrayList<BrickOrder> variable. The stored ArrayList
* can be returned to OrderSystem at any time for updating and
* information extraction.
*/
public class OrderDB {
package test;
import static org.junit.Assert.*;
import java.util.ArrayList;
import org.junit.Before;
import org.junit.Test;
import core.BrickOrder;
package core;
import java.util.ArrayList;
import java.util.Scanner;
/*
* Design principles ideas to implement
* - Reduce responsibility of this class, move excess functionality into different classes
* -> Order builder class, instead of building orders within this class
* -> Printer class?
class Challenge {
private static char[] chars;
private static int indexOfFirstNonRepeat;
/*
* @Param String input - String to be tested for first repeated character
* @Return String firstNonRepeatSensitive - String containing single character that represents first
* non-repeated character in input string (case-sensitive)
*/
public static String firstNonRepeatingLetter(String input)
class Challenge {
private static String hashes;
private static String content;
private static int numHashes;
/*
* Parses input markdown into HTML header format
* @Param String markdown - String holding markdown string for converstion
* @Return String output - HTML format of input markdown
import java.util.List;
import java.util.Arrays;
class Challenge {
private static Integer[] input;
private static int inputLength;
private static String concatBinary;
private static int resultantValue;