Java 2 Course Outline

Java 1.6 API | Return to the Java 2 Homepage

Date C. # Assignment
2/3/2009 1

About Java 2/Course Expectations

What you need to know (Review Packet)

2/5/2009 2

GO OVER THE JAVA 1 FINAL EXAMS
Start Lab 1 - Revisiting Coins

2/10/2009 3 Finish Lab 1, do the extra credit
If you complete both, have me check them, then open up the EasyEvents project and explore the GUI classes. The documentation below will be our guide.
EasyEvents Doc
| EasyEvents Summary
2/9/2009 4

Complete Lab 1 - Begin looking at EasyEvents
Read through the EasyEvents Doc first half (MathQuiz)

2/11/2009 5 Look at EasyEvents Doc | EasyEvents Summary
2/13/2009 6 Start our Coin Game GUI based upon this Outline | Screen Shot | Coin Pictures
Continue working on the CoinGame GUI | CoinGameGUI Start Code [label + 2 buttons]
2/24/2009 7 Continue Coin Game GUI today.
2/26/2009 8 Finish CoinGameGUI | Begin Lab 3: Craps | QUIZ NEXT CLASS on the Review Packet
I will be coming around to check your labs.
3/2/2009 9 Programming Day - Quiz
3/4/2009 10 QUIZ in class on the Review Packet - Finish Lab 3: Craps and Lab #2
3/6/2009 11

Finish Craps
If done, experiment with making another GUI of your choice! :)

3/10/2009 12

FINISH CRAPS

3/12/2009 13

Our first look at JOptionPane and extend the BasicGame to provide hints
* Discuss our ChangeWords class and additional string methods
* Inside of Games, create a new CLASS called BasicGame
* In your Java 2 folder, open the text file "Chapters 4-6 Listings"
* Copy BasicGame (including the import statement above it) into the BasicGame class
* Look at the code and then run the file
* Extend the BasicGame to a new class GuessWordGame that gives better hints
* Discuss super, substring, int, ++, /n, private variables, constructors with parameters.

3/16/2009 14

* Extend the BasicGame to a new class GuessWordGame that gives better hints
* Discuss super, substring, int, ++, /n, private variables, constructors with parameters.

  • Together: Extend the GuessWordGame to use arrays to play multiple games
  • We will need:
  • Arrays --> We will briefly demo arrays.
  • Accessors
  • Modifiers
  • setting and resetting counting variables
  • Discuss ideas for a simple word game

(Add a 2d array of hints/words)

Things to add to your GuessWordGame

  • Create an Array of words.
  • After each round, choose the next word in the Array to be guess-word.

To create an array of word:
String[] words = {"firstWord", "secondW", "tW"};
To use the second word, you could say: words[1];
To get the first 3 letters of the third word, you could say: words[2].substring(0,3);

3/18/2009 15

GuessWordGame (code from last class)

Look at String in the API
Discuss 2D Arrays
Learn the game "Jotto".

3/20/2009 16
  • Finish the array of hints
  • Discuss ideas for a simple word game
  • Create MyGame class that extends the BasicGame and WRITE A DESCRIPTION OF YOUR GAME IN THE DOCUMENTATION.
  • CALL ME OVER to okay your idea.
  • You will have until the end of class #18 to complete your game.*
    *If you finish your game, MAKE ANOTHER ONE.
    Extra Credit: Create a JOptionPane that will allow users to chose the game they to want play.
  • How to make a word scramble (Java Code)
3/24/2009 17

START MAKING GAMES!

The über Java Guessword Scramble Hint Extravaganza
Finish that Sentence with super hints
Hangman
Cryptogram
Guess the definition
Hangman/Guess the definition
Jotto
Mad Libs
Trivia Game
Slogans – guess the company!
Bingo
Word or phrase with missing letters
“I Spy” ?
What doesn’t belong
Riddles

3/26/2009 18 Continue working on our games - If finished, make another one
Monday is the last day in class - next Wednesday we will play our games
3/30/2009 19

Finish our games!

HOMEWORK
- Read Chapter 4 in Link to JavaAN Chapter 4

4/1/2009 20
  • Load your game and look over all the class files in your project
  • Look at the list below and see if you used them:
  • Array (creation and filling them)
  • while loop
  • Accessors (get methods) and modifiers (set methods)
  • JOptionPane (and what you can do with it)
  • NO_OPTION
  • \n escape character - new line
  • do .. while
  • We will discuss these!
  • Rotate to the RIGHT, playing each other's games.

Go over the reading (Chapter 4 in JavaAN)

Next class is your 10 week exam. It is ONLY programming. :)

4/3/2009 21

TEN WEEK EXAM

4/7/2009 22

    "TODAY'S" AGENDA WILL TAKE a couple of days.

  • READ CHAPTER 4
    Do p. 4-12, ex 4-7, 4-8, and 4-9. type the answers together on an exercise sheet (new Word document)
    Discuss doing arithmetic (+,-,*,/,%) with integer variables
    ---> Link to BlueJ Chapter 4

- Read Pages "Int 1" to "Int 6" in Java Au Naturel
Complete Exercises 1, 2, 4, and 6.

Create the Time class
Take a look at time (how you add times, military time, etc.)
Take a look at Time (p. 4-14)
Create a Time project and copy code for Time and TimeTester into new classes
Study and understand the Time code
Rewrite the TimeTester to output to the console
Add exercises 4.11-4.14 to bottom of the "chap4exercises" sheet


TIME EXERCISES: 4.13, 4.14, 4.16

4/9/2009 23

TRY THE AP Class Lab #1

4/21/2009 24

 

- Revisit Pages "Int 1" to "Int 6" in Java Au Naturel
Try these problems

[Revisit the Time Class]
Start Lab 5 based upon the Time Project.

4/23/2009 25
4/27/2009 26


Finish Lab 5
More problems with Time to test your lab.

**When done, have Mr. Merlis check your complete lab.**

 

4/29/2009 27

We are starting with 15 minutes of Time for Mr. Merlis to check your programs!

  • Create a new class, GuessNumber, in your game project and copy the code from the listings. Play the game.
  • Look at the code together and discuss new features.
  • Do exercises 4.21 to 4.24, work on 4.27
  • EXTRA CREDIT: In the game folder, make a class Liar and do Ex 4.28 and 4.29 (in the comments)

NEXT - OPEN and play Nim and Mastermind
Figure out how to beat Nim!

5/1/2009 28

Nim and Mastermind

  • Create a new class, GuessNumber, in your game project and copy the code from the listings. Play the game.
  • Look at the code together and discuss new features.
  • Do exercises 4.21 to 4.24, work on 4.27
  • EXTRA CREDIT: In the game folder, make a class Liar and do Ex 4.28 and 4.29 (in the comments)

 

5/5/2009 29

Begin Minnow - Download the source code from the Public Folder

Begin the Minnow Project - Work sequentially

[Minnow Project Additional Methods]
Check out the other types of fish to make!

5/7/2009 30 Keep Working on Minnow
5/11/2009 31

Finish up the intro exercises Minnow Project - Work sequentially

Minnow Project Additional Methods - Create more fish!

5/13/2009 32

Finish up the intro exercises Minnow Project - Work sequentially

Minnow Project Additional Methods - Create more fish!

5/15/2009 33

 

You should be working on Left and Right fish.
Move onto the Hungry Fish and SmellyFish.
Check out the source code for the Tadpoles.

CODE THAT SOLVES THE PROBLEM OF HUNGRY FISH SUCCESSFULLY EATING OTHERS

SQUARE ENVIRONMENT Source Code


5/19/2009 34

Continue with Minnow

5/21/2009 35 Take the Minnow Test
5/27/2009 36

Last day for Minnow

5/29/2009 37

Complete the WALKER Assignments 1 and 2.

 

6/2/2009 38

Complete the WALKER Assignments 1 and 2.

Walker Graphics --> Today's Agenda

Layout your drawing on graph paper.
Think about different positions it will be in.
WalkerApplet

Continue working on your Walker


Items to consider

  • Creating a background "scene"
  • Controlling movement/actions with the keyboard
  • You should continue working on your walker with the following sequence:
    1. Finish Walker1 and Walker2 (be sure that Walker2 is in a separate main method.)
    2. Start Walker3 (be sure this is in your Walker2 PROJECT!)
    For Walker3, you need to READ the JavaDoc in the Walker class to make a new constructor.

    You should DESIGN YOUR PICTURE on graph paper (available on the back table.) Then create it in a draw() method in the Walker class. If you finish your picture, move on to making a background scene that will go behind your Walker.

    IF YOU FINISH THAT, take a look at the LINK on the main Java2 page that says "Applets Use of Keyboard". Copy that code into a class "KeyboardAndFocusDemo" and see how it works. You will want to integrate it into your Walker.

    6/4/2009 39

    Continue working on Walker

    6/8/2009 40

    Walker
    - Make backgrounds for your Walker! (walker4)
    - start the Extra Credit

    PREVENTING WALKERS FROM "walking" into obstacles

    6/10/2009 41

    Finishing up Walker

    Final Exam Review Page

    6/12/2009 42

    FINAL EXAM

    9:40am to 11:20am