Cover image of APCS Java
(4)
Education
Courses

APCS Java

Updated 6 days ago

Education
Courses
Read more

Helpful video Podcast for folks taking a course in Advanced Placement Computer Science

Read more

Helpful video Podcast for folks taking a course in Advanced Placement Computer Science

iTunes Ratings

4 Ratings
Average Ratings
3
1
0
0
0

A Genuine Look into the Programming Process

By cmslewis - Nov 12 2008
Read more
This is fantastic! I chose a random episode to watch first, and five minutes into the episode about inheritance, I was hooked. Chris demonstrates (whether he intends to or not) that programming is a process that requires creativity and, unavoidably, patience. I can't wait to watch the rest of these!

iTunes Ratings

4 Ratings
Average Ratings
3
1
0
0
0

A Genuine Look into the Programming Process

By cmslewis - Nov 12 2008
Read more
This is fantastic! I chose a random episode to watch first, and five minutes into the episode about inheritance, I was hooked. Chris demonstrates (whether he intends to or not) that programming is a process that requires creativity and, unavoidably, patience. I can't wait to watch the rest of these!
Cover image of APCS Java

APCS Java

Updated 6 days ago

Read more

Helpful video Podcast for folks taking a course in Advanced Placement Computer Science

Rank #1: One To Ten Game Part 3

Podcast cover
Read more
Part 3 of the One to Ten Game which explains the Player Class. You can see a working copy at http://www.mathorama.com/OneToTenConsole.html

Oct 24 2011

Play

Rank #2: One to Ten Game Part 1

Podcast cover
Read more
In this tutorial, we make a game called "1 to 10" rather than tic-tac-toe (naughts and crosses). We will construct A Board Class in the first part along with a tester class. The idea is to move a page either one or two positions, and the one in the last position loses. The strategy is not to difficult, so eventually we can make a robot player who will always play perfectly.

Oct 23 2011

Play

Rank #3: Making a JAR file in Eclipse

Podcast cover
Read more
If you want to publish your Applet to the web, you probably need to make a Java Archive, or JAR file that allows you to embed your Applet in a web page

May 23 2011

Play

Rank #4: Java Interfaces Parts 1 and 2

Podcast cover
Read more



We introduce a way to use code to work with a variety of classes using interfaces. Source code can be found at the APCS Wiki

Feb 21 2011

Play

Rank #5: Cryptography

Podcast cover
Read more
Starting Code:
import java.util.Scanner;
/**
* Simple Polyalphabetic Cryptography
*
* @Chris Thiel
* @28 Feb 2009
*/
public class VignereCipherStartingCode
{
private static final String alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
private static int nextChar(String k, int i){
i=i%k.length();
String letter=k.substring(i,i+1);
return alphabet.indexOf(letter);
}
public static String encode (String m, String k){
String result="";
for (int i=0; i int offset=nextChar(k, i);
String letter = m.substring(i,i+1);
int newLetterIndex= alphabet.indexOf(letter)+offset;
newLetterIndex=newLetterIndex % 26;
result+=alphabet.substring( newLetterIndex, newLetterIndex+1);
}
return result;
}
public static String decode (String m, String k){
String result="";
return result;
}
public static void main(String[] args)
{
Scanner kb=new Scanner(System.in);
System.out.print("Type a key: ");
String key=kb.nextLine();
key=key.toUpperCase();
key=key.replace(" ","");//omit spaces
System.out.print("Type a message: ");
String message=kb.nextLine();
message=message.toUpperCase();
message=message.replace(" ","");
System.out.println("Using the key \""+key+"\" on \""+message+"\":");
String codedMessage=encode(message,key);
System.out.println("Coded="+codedMessage);
System.out.println("Decoded="+decode(codedMessage,key));
System.out.println("Using the key 'LOVE' we encode 'BOOHOO' we should get 'MCJLZC' : "+encode("BOOHOO","LOVE"));
System.out.println("Using the key 'QUICK' we decode 'TOKMXEQ' we should get 'DUCKNOW': "+decode("TOKMXEQ","QUICK"));

}
}

  • 8 points: Complete the decode method so it can decipher the Vignere Cipher
  • 9 points: Adapt this so it can do a Progressive Polyalphabetic Cipher rather than a key
  • 10 points: Adapt the CarTalk Employee Applet's graphic user interface so that you can type a message in one text area, press a button and it shows the encoded text (using the Progressive Cipher), press another button and it shows the decoded text.
  • 11 points: Add a "key field" to the Applet, and use the Vignere Cipher, working in a similiar fashion as the 10 point version

May 14 2010

Play

Rank #6: PokerHand

Podcast cover
Read more


To make a variety of Poker games, we need a way to evaluate and compare Poker hands. This video also shows how to implement an interface in an inner class, so that a user can press a button, and new poker hands are generated. Starter code can be found at the APCS Wiki.

Nov 28 2009

Play

Rank #7: Making Classes with the Eclipse IDE

Podcast cover
Read more

Make mew Projects and Classes in Eclipse.

Sep 07 2009

Play

Rank #8: Dr Java interactions

Podcast cover
Read more
Click on the title to see the video. Here I show how to try the code snippets that you will see while reading Chapter 2 of Horstmann, "Java Concepts"

Aug 23 2009

Play

Rank #9: Game Applet Stage 3

Apr 08 2013

Play

Rank #10: Game Applet: Stage 1

Podcast cover
Read more
Stage 1: Load the art and sounds to your eclipse project, so you can export your game into a .jar file to easily upload to a web site.  You can get to the game and the source files at:
Link to Game
Link to Source Code
Link to Video
Link to Video on YouTube

Apr 06 2013

Play