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.util.Scanner; | |
/** | |
* A simple class to run the Chatbot class. | |
* @author Laurie White | |
* @version April 2012 | |
*/ | |
public class ChatbotRunner | |
{ |
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
/** | |
* A program to carry on conversations with a human user. | |
* This is the initial version that: | |
* <ul><li> | |
* Uses indexOf to find strings | |
* </li><li> | |
* Handles responding to simple words and phrases | |
* </li></ul> | |
* This version uses a nested if to handle default responses. | |
* @author Laurie 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
// Class: TheaterRunner | |
// Purpose: This program tests the Theater class by making an ArrayList of | |
// Customers, making a Theater object, calling the methods & | |
// printing the results. | |
// | |
// Tim Gallagher | |
// 2019 APCS A Facebook Summit | |
import java.util.*; |
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.util.Scanner; | |
public class DavisChatbotRunner | |
{ | |
public static void main(String[] args) | |
{ | |
// YOU MAY NEED TO RENAME THIS CLASS TO WHATEVER YOU CALLED IT | |
Chatbot maggie = new Chatbot(); | |
Scanner in = new Scanner (System.in); |
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 HW1 { | |
public static void main(String[] args) { | |
/* | |
* Problem #1: Ask the User for three positive numbers | |
* and print out the lowest value |
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.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Scanner; | |
public class DMV { | |
static Scanner s = new Scanner(System.in); | |
// Noah Rubin needs to register the time machine at the DMV. Unfortunately, the DMV is especially busy today, | |
// and he must wait in line with the rest of the disgruntled drivers. Noah would like to offer the person |
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.util.Scanner; | |
public class SmugglingFish { | |
static Scanner s = new Scanner(System.in); | |
// Write a program that is given a type and amount of fish that they would like to put in | |
// the time machine’s tank and determines if they will fit. If the fish take up exactly | |
// 1500 in3 of space, the output should still be true. |
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 core.data.*; | |
public class Welcome01 { | |
public static void main(String[] args) { | |
String id = "KATL"; | |
DataSource ds = DataSource.connect("http://weather.gov/xml/current_obs/" + id + ".xml"); | |
ds.setCacheTimeout(15 * 60); | |
ds.load(); | |
// ds.printUsageString(); |
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.io.*; | |
import java.util.Scanner; | |
public class Files { | |
public static void main(String[] args) { | |
File f = new File("nums.txt"); | |
FileWriter fileWriter = 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
public class Student extends EAPerson{ | |
private int gradYear; | |
public Student(String name, int gradYear){ | |
} | |
public void createUsername(String n){ | |
String last =n.substring(n.lastIndexOf(" ")+ 1, n.lastIndexOf(" ")+ 5); |
NewerOlder