This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void setup() | |
{ | |
size(500,500); | |
background(0); | |
} | |
void draw() | |
{ | |
background(255); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FreeResponse<V> | |
{ | |
// Driver code | |
static LinkedList ppl = new LinkedList(); | |
static LinkedList ppl2 = new LinkedList(); | |
static LinkedList nums = new LinkedList(); | |
static int one = 0; | |
static int two = 0; | |
static int three = 0; | |
public static void main(String[] args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class freeResponseRunner<V> | |
{ | |
LinkedList list; | |
LinkedList nlist; | |
public freeResponseRunner() | |
{ | |
list = new LinkedList(); | |
list.insert(list, 2); | |
list.insert(list, 2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Queue<V> { | |
int maxSize; | |
LinkedList que; | |
int nItems; | |
public Queue(int m){ | |
maxSize = m; | |
nItems = 0; | |
que = new LinkedList(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Color; | |
public class Bubbles | |
{ | |
int x; | |
int y; | |
int radius; | |
Color color; | |
int xSpeed; | |
int ySpeed; | |
public Bubbles(int x, int y){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[] a = new int[255]; | |
ArrayList<Integer> left = new ArrayList<Integer>(); | |
int x = 0; | |
int xw = 0; | |
int y = 0; | |
boolean swapOccured = true; | |
int i = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
/** | |
* Write a description of class passwordGenerator here. | |
* | |
* @author (your name) | |
* @version (a version number or a date) | |
*/ | |
public class passwordGenerator | |
{ | |
static String letters = "abcdefghijklmnopqrstuvwxyz"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class first | |
{ | |
int[]a={2,4,6,8,1,3,5,2}; | |
int save = 0; | |
public first() | |
{ | |
for(int i = 0; i < a.length; i++){ | |
for(int q = i+1; q < a.length; q++){ | |
if(a[i]>a[q]){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class funPrimes | |
{ | |
public static void main(String[] args){ | |
Scanner scan = new Scanner(System.in); | |
boolean keepGoing = true; | |
int test = 0; | |
System.out.println("Enter a number to test if it's prime."); | |
System.out.println("If you want to exit, enter 0."); | |
while(keepGoing){ |