This file contains hidden or 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.*; | |
public class AList | |
{ | |
private int data[]; | |
private int howMany; | |
public AList(int length) | |
{ | |
howMany = length; |
This file contains hidden or 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 CharStack { | |
private char data[]; | |
private int top; | |
public CharStack(){ | |
data = new char[100]; | |
top = -1; | |
} | |
public void push(char c){ | |
data[++top] = c; |
This file contains hidden or 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.*; | |
import java.awt.event.*; | |
public class BracketChecker extends EventPanel implements ActionListener, TextListener { | |
private TextField field; | |
private Label answerLabel, title, instructions;; | |
public BracketChecker(){ | |
setBackground(Color.white); |
This file contains hidden or 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.*; | |
import java.awt.event.*; | |
public class Calculator { | |
private DoubleStack memory; | |
private CharStack operators; | |
private String postfix; | |
private double numbers[]; |
This file contains hidden or 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.*; | |
import java.io.*; | |
public class AList | |
{ | |
private Node head; | |
public AList() | |
{ | |
head = new Node ("<fake>", 0, null); |
This file contains hidden or 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.*; | |
public class AList | |
{ | |
private Node head; | |
public AList() | |
{ | |
head = new Node ("<fake>", -99, null); | |
} |
This file contains hidden or 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.net.*; | |
import java.util.*; | |
public class Temperature { | |
public static void main(String[] args) throws Exception { | |
Scanner userInput = new Scanner(System.in); | |
System.out.println("Enter a zip code"); | |
String zipcode = userInput.nextLine(); | |
URL u = new URL("http://www.weather.com/weather/local/"+zipcode+"?lswe="+zipcode+"49855&lwsa=WeatherLocalUndeclared&from=searchbox_localwx"); | |
Scanner webpage = new Scanner(u.openStream()); |
This file contains hidden or 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 House { | |
private double houseTemp; | |
private static double outsideTemp; | |
public House (double houseTemp) { | |
this.houseTemp = houseTemp; | |
} | |
public static void setOutsideTemperature(double outsideTemp) { | |
House.outsideTemp = outsideTemp; |
This file contains hidden or 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.applet.Applet; | |
import java.awt.event.*; | |
import java.awt.*; | |
public class MyFirstApplet extends Applet implements KeyListener, MouseListener { | |
private Deck myDeck; | |
public void init() { | |
addKeyListener(this); | |
addMouseListener(this); |