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
/** | |
* 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 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 factoral{ | |
public factoral(){ | |
System.out.println(factorial(6)); | |
} | |
public int factorial(int n){ | |
int product = 1; | |
for(int i = 1; i <= n; i++){ | |
product *= i; | |
} | |
return product; |
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 ArrayListAssignment { | |
public static void main(String[] args) { | |
Scanner scan = new Scanner(System.in); | |
//int y = scan.nextInt(); | |
ArrayList<Integer> ages = new ArrayList<Integer>(); | |
boolean keepAsking = true; | |
System.out.println("Type in at least 6 ages of you and your family. After 6 ages, type in a negative number to continue."); |
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 advisorySnacks { | |
public static void main(String[] args) { | |
// Creating an ArrayList of String | |
List<String> students = new ArrayList<>(); | |
// Adding new elements to the ArrayList | |
students.add("Sameer");// |
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 syllable here. | |
* | |
* @author (your name) | |
* @version (a version number or a date) | |
*/ | |
public class syllable | |
{ | |
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
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.WindowConstants; | |
import java.awt.Dimension; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Point; | |
import java.awt.event.MouseListener; |
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.*; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.WindowConstants; | |
import java.awt.Dimension; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Point; | |
import java.awt.event.MouseListener; |
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 javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.WindowConstants; | |
import java.awt.Dimension; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Point; | |
import java.awt.event.MouseListener; |
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 javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.WindowConstants; | |
import java.awt.Dimension; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.Point; | |
import java.awt.event.MouseListener; |
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
/** | |
* various math equations | |
* | |
* @author (Erica) | |
* @version (9/18/18) | |
*/ | |
public class objectClass | |
{ | |
public objectClass(){ |