Skip to content

Instantly share code, notes, and snippets.

View abhamra's full-sized avatar

Arjun Bhamra abhamra

View GitHub Profile
package hashTable;
import java.util.*;
import java.io.*;// Import the Scanner class to read text files
import java.net.*;
public class StockMarketNew {
//arraylists
static ArrayList<String> tickers = new ArrayList<String>();
ArrayList<String> price = new ArrayList<String>();
ArrayList<String> pe = new ArrayList<String>();
package hashTable;
import java.awt.Color;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
package hashTable;
import java.awt.Color;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
package hashTable;
import java.util.ArrayList;
public class FreeResponse
{
static ArrayList<String> artistNames = new ArrayList<String>();
// static ArrayList<Integer> artistCount = new ArrayList<Integer>(); (MAKE AN ARRAY OF LENGTH ARTISTNAMES INSTEAD)
// Driver code
package hashTable;
import java.net.*;
import java.io.*;
import java.util.StringTokenizer;
import java.util.Scanner;
public class StockMarketHash
{
static HashTable h = new HashTable(20);
import java.awt.Color;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsEnvironment;
import java.awt.Point;
import java.awt.event.MouseListener;
import java.awt.Color;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
import java.awt.Color;
public class Bubble
{
int x;
int y;
int radius;
int xSpeed;
int ySpeed;
Color c;
public Bubble(int x, int y){
public class LinkedList<E> {
Node head; // head of list
// Method to insert a new node
public void add(E data) {
// Create a new node with given data
Node new_node = new Node(data);
// If the Linked List is empty,
if (head == null) {
head = new_node;
} else { // Else traverse till the last node
/**
* Write a description of class GuessingGame here.
*
* @Arjun Bhamra
* @9/6/19 --> 9/14/20
*/
import java.util.*;
import java.lang.String;
public class GuessingGame