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.*; | |
| public class Cryptogram | |
| { | |
| public Cryptogram() | |
| { | |
| char[] alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#*&%".toCharArray(); | |
| String[] al=new String[alphabet.length];//you can use this array for finding the location of character in the alphabet | |
| for(int i=0; i < alphabet.length; i++){// this sets each letter of alphabet into string array al[] | |
| al[i]=String.valueOf(alphabet[i]); |
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.*; | |
| public class Cryptogram | |
| { | |
| public static void main (String[] args) | |
| { | |
| char[] alphabet = "abcdefghijklmnopqrstuvwxyz".toCharArray(); | |
| String[] al=new String[26];//you can use this array for finding the location of character in the alphabet | |
| for(int i=0; i < alphabet.length; i++){// this sets each letter of alphabet into string array al[] |
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.*; | |
| import java.io.*; | |
| import java.text.*; | |
| public class ReadFromFile { | |
| String cont="yes"; | |
| String accRead[]; | |
| int counter=0; |
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.*; | |
| import java.io.*; | |
| import java.text.*; | |
| public class WriteToFile { | |
| String cont="yes"; //allows while loop to run through at least once | |
| Scanner in = new Scanner(System.in); | |
| boolean append = false; |
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
| /* | |
| 1) make so you slow down if you hit into the inner red rectangle | |
| -- look at lines of code starting at 129 | |
| Optional additions: | |
| 1) place other obstacles on the course | |
| 2) keep track of laps you go and make it game end after 5 laps and show score to the screen | |
| */ |
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
| /* | |
| 1) add track | |
| 2) add pause/start function | |
| 3) add text with a score - lowest score wins | |
| 4) if you hit sides, you lose points (add points to score) | |
| 5) other obstacles | |
| 6) speed increase as game goes on? | |
| */ |
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
| color fillVal = color(126); | |
| void setup(){ | |
| size(680, 620); | |
| } | |
| void draw() { | |
| size(680, 620); | |
| fill(fillVal); | |
| rect(25, 25, 20, 50); |
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.event.MouseListener; | |
| import java.awt.event.MouseEvent; | |
| import java.awt.Color; | |
| import java.awt.Dimension; | |
| import java.awt.Font; | |
| import java.awt.FontMetrics; | |
| import java.awt.Graphics; | |
| import java.awt.Toolkit; | |
| import java.awt.event.KeyAdapter; |
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 javax.swing.JFrame; | |
| public class Starter extends JFrame { | |
| public Starter() | |
| { | |
| add(new Board()); | |
| setTitle("Board"); | |
| setDefaultCloseOperation(EXIT_ON_CLOSE); | |
| setSize(500,500); |
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
| <html> | |
| <head> | |
| <title>Guessing Game</title> | |
| </head> | |
| <body> | |
| <div style="margin: 0 auto;width:200px;text-align:center"> | |
| <div id="test" style="color:#ff0000;font-size:20px;">Hello, World Goodbye</div> |