|
|
Click for Instructions
Click on the date to open the details.
Click date again to close the details.
|
| Day |
Date |
|
Discussion
|
| 1 |
04/03/06 |
|
Monday - SkillsUSA, C++ Scope & Lifespan, "battleship", PowerPoint Demonstrations |
|
- Classroom Discussion -
- SkillsUSA - PDP Level 1.3 "Time-Management Skills", cont'd
- SkillsUSA home page - Contest Updates:
- C++ - about.com - Lesson 28: Scope & Lifespan
- PowerPoint Demonstrations
- Lab Assignment -
- Complete the "battleship" game:
- Get & record shots
- Determine a winner
- Hide the computer ship placements
- Do another one of the following group:
- Program assignment - Create a C++ program to display how many times each letter of the alphabet is used in the Gettysburg Address - specifications last Friday
- Program assignment - Create a C++ program to calculate Factorial! for a user supplied integer number - specifications last Friday
- Program assignment - Create a C++ program to determine if three numbers would form a triangle - specifications last Friday
|
| 2 |
04/04/06 |
|
Tuesday - Vocabulary, C++ Inheritance, PowerPoint Demonstrations |
|
- Classroom Discussion -
- Technology Vocabulary - an daily circulation
- C++ - about.com - Lesson 29: Inheritance
- PowerPoint Demonstrations
- Lab Assignment -
- Last call on "battleship" game
- Do another one of the following group:
- Program assignment - Create a C++ program to display how many times each letter of the alphabet is used in the Gettysburg Address - specifications last Friday
- Program assignment - Create a C++ program to calculate Factorial! for a user supplied integer number - specifications last Friday
- Program assignment - Create a C++ program to determine if three numbers would form a triangle - specifications last Friday
- Program assignment - Create a C++ program to let the computer write a poem:
- Create a new console application & source file "poetry"
- Copy the text file "poetryWords.txt" from the "Q:" drive (or find your own list on the internet)
- There are almost 1000 words in "words.txt" - read them all until EOF into an array variable
- Randomly choose & display words to form a computer poem
- Determine what looks best:
- How many lines? 4?
- How many words per line? 7?
- Should the number of words on each line vary?
- Can you place words based on the number of syllables in each word?
- Save initially to your "MyDocuments" folder
- Test frequently
- Copy to your "H:/" drive
|
| 3 |
04/05/06 |
|
Wednesday - Career, C++ Polymorphism, PowerPoint Demonstrations |
|
- Classroom Discussion -
- Career - last update of the résumé
- C++ - about.com - Lesson 30: Polymorphism
- PowerPoint Demonstrations
- Lab Assignment -
- Catchup
- Battleship cleanup
- Work on Essays due to Ms. Beatty-Sharisky
|
| 4 |
04/06/06 |
|
Thursday - Vocabulary, C++ Exceptions, PowerPoint Demonstrations |
|
- Classroom Discussion -
- Science - How Networks Work from howstuffworks.com
- C++ - about.com - Lesson 34: Exceptions
- PowerPoint Demonstrations
- Lab Assignment -
- QUIZ - Take the C++ Quiz 4. Click the link & follow the instructions. PRINT & HAND IN. Open notes, open internet, open C++ IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student for help
- Catchup
|
| 5 |
04/07/06 |
|
Friday - Math, Network Demonstration |
|
- Classroom Discussion -
- Math, Ms. Verde & Hexadecimal numbers
- Networking discussion
- Lab Assignment -
- Networking demonstration
|
|
04/10/06 |
|
Monday - Spring Break - No School |
|
04/11/06 |
|
Tuesday - Spring Break - No School |
|
04/12/06 |
|
Wednesday - Spring Break - No School |
|
04/13/06 |
|
Thursday - Spring Break - No School |
|
04/14/06 |
|
Friday - Spring Break - No School
|
|
04/17/06 |
|
Monday - Spring Break - No School |
|
4 Weeks |
|
SkillsUSA State Competitions - Practice |
| 6 |
04/18/06 |
|
Tuesday - Vocabulary, Java's Cool, "helloWorld" |
|
- Classroom Discussion -
- Technology Vocabulary - a daily enterprise
- ibiblio.org - Brewing Java - Why Java's Cool
- ibiblio.org - Brewing Java - The Syntax (up to command line arguments)
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Use NetBeans to create a Java Project & Source File "helloWorld" to display "Hello World!"
- Personalize the Hello World program with your name so that it displays "Hello <your name>
- Write a program that produces the following output:
Hello <your name>!
It's been nice knowing you.
Goodbye world!
- Write a program that draws the following figures one above the other:
* * * * * *
* * * * * * *
* * * * * * * *
* * * * * * * * *
* * * * * * * * * *
- Now modify it to draw them next to each other like above
|
| 7 |
04/19/06 |
|
Wednesday - Career, Java Syntax, "temperature" |
|
- Classroom Discussion -
- Career - Job Hunting Myths:
- ibiblio.org - Brewing Java - The Syntax (if else variables)
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a NetBeans World Famous Java Project & Source File "temperature" program:
- Convert 86F to 30C & display
- Convert 25C to 77F & display
- Create a NetBeans World Famous Java Project & Source File "salary" program:
- Adam earns $10.00 per hour for 30 hours
- Beth earns $10.00 per hour for 40 hours
- Chad earns $10.00 per hour for 50 hours
- Gross pay is calculated as pay rate times hours worked
- Overtime gross pay is an additional 50% (.5) for any hours worked over 40 hours
- Taxes is calculated at 20% (.2) of gross pay
- Net pay is the difference between gross pay & taxes
- Display name, pay rate, hours worked, gross pay, taxes, net pay for each worker
- Don't use any variables (since I haven't shown you how yet)
- Create a NetBeans World Famous Java Project & Source File "grades" program:
- 93 - 100 earns an "A"
- 85 - 92 earns a "B"
- 75 - 84 earns a "C"
- 65 - 74 earns a "D"
- Anything lower earns an "F"
- Display a letter grade for 95
|
| 8 |
04/20/06 |
|
Thursday - Science, Java Classes, Variables, "salary" |
|
- Classroom Discussion -
- Science -
- ibiblio.org - Brewing Java - Classes: A First Look
- leepoint.net - Java Variables
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Modify "temperature" based on the code from the online text
- Modify "salary" to use variables: payRate, hoursWorked, grossPay, taxes, netPay
- Modify "grades" to use variables: numberGrade, letterGrade
|
| 9 |
04/21/06 |
|
Friday - SkillsUSA, Java Variables, "grades" |
|
- Classroom Discussion -
- SkillsUSA - PDP Level 1.3 "Time-Management Skills", cont'd
- SkillsUSA home page:
- Contest Descriptions - Web Design - Evaluates each contestant's preparation for employment & to recognize outstanding students for excellence & professionalism in the field of Web design
- Complete Web Design contest description
- Contest Updates - Web Design was approved as an official contest. The project for 2006 will entail each team building a completely working web site for a non profit agency with a theme that is consistent with this year's theme: the area of Employment. Focus on web site accessibility issues as outlined in the current Web Content Accessibility Guidelines (more information at http://www.w3.org/WAI/intro/wcag.php)
- Saturday, May 13th, guidelines
- ibiblio.org - Brewing Java - Floating Point Variables
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Modify "temperature" to use floating point variables
- Modify "salary" for floating point variables
- Modify "grades" for float
|
|
3 Weeks |
|
SkillsUSA State Competitions - Practice |
| 10 |
04/24/06 |
|
Monday - SkillsUSA, Java Review, catch-up |
|
- Classroom Discussion -
- SkillsUSA - PDP Level 1.3 "Time-Management Skills", cont'd
- SkillsUSA home page:
- Contest Descriptions - Web Design - Evaluates each contestant's preparation for employment & to recognize outstanding students for excellence & professionalism in the field of Web design
- Complete Web Design contest description
- Contest Updates - Web Design was approved as an official contest. The project for 2006 will entail each team building a completely working web site for a non profit agency with a theme that is consistent with this year's theme: the area of Employment. Focus on web site accessibility issues as outlined in the current Web Content Accessibility Guidelines (more information at http://www.w3.org/WAI/intro/wcag.php)
- Saturday, May 13th, guidelines
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Java Review:
- All Java is Classes
- Runs inside Java Virtual Machine on any computer
- Free! java.com
- Google search finds 1.22 BILLION Java pages
- Java programs include applications, applets, servlets, & more
- Java similar to C++ but not identical
- public static void main() { }
- Sequential statements
- Decision statements (if, if else, switch)
- Iteration statements (for, while, do while)
- Multiple statements get surrounded by squirrelly braces { }
- Most lines end with a semi-colon ;
- include javax.swing.*; for input box & message box
- stringVariable = JOptionPane.showInputDialog(null, "your message here") returns a string value & needs to be assigned to a string variable
- JOptionPane.showMessageDialog(null, "your message here") does not return a value & is used alone on a line
- doubleVariable = Double.parseDouble(stringVariable) will change a string into a double
- integerVariable = Integer.parseInt(stringVariable) will change a string into an integer
- characterVariable = stringVariable.charAt(0) will copy the first character value in the string variable into the character variable
- Lab Assignment -
- Complete assignments from last week
- Complete the Java "temperature" program:
- Ask the user [F]ahrenheit or [C]entigrade?
- Convert F to C or convert C to F & display the correct results
- Ask if the user wants to continue
- Loop until the user chooses to exit
- Complete the Java "salary" program:
- Ask the user how many employees? & save the result
- Loop for howMany employees
- Get the employee name from the user
- Get the hours worked from the user
- Get the pay rate from the user
- Calculate gross pay (including any overtime)
- Calculate taxes as 20% of gross pay
- Calculate net pay as the difference between gross pay & taxes
- Display all variables & results to the user
- Complete the Java "grades" program:
- Ask the user for a number grade
- Determine & display the appropriate letter grade
- Loop until the user enters a negative number to exit
|
| 11 |
04/25/06 |
|
Tuesday - Vocabulary, Java Methods, "temperature" using methods |
|
- Classroom Discussion -
- Technology Vocabulary - a daily transpiration
- ibiblio.org - Brewing Java - Methods
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Modify the Java program "temperature" to use methods:
- Write a method to convert F to C
- Write a method to convert C to F
- Call the appropriate method inside the if statements
- Modify the Java program "grades" to use methods:
- Write a method to calculate & return a letter grade given a number grade
- Call the method from the display statement
- Modify the Java program "salary" to use methods:
- Write a method to calculate & return gross pay
- Write a method to calculate & return taxes
- Write a method to calculate & return net pay
- Call the appropriate methods inside the display statements
|
|
| New Chair Rules | What The Rule Means |
| Clean | No Feet |
| Pneumatic | No Elevators |
| Cost Money | No Damaging |
| Comfortable | No Sleeping |
| Sit Up Straight | No Slouching |
| Convenient Wheels | No Rolling |
| PreAssembled | No Disassembling |
| Cushioned | No Not Paying Attention |
|
| 12 |
04/26/06 |
|
Wednesday - Career, Java Recursive Methods, "fibonacci", Federal Tax Freedom Day |
|
- Classroom Discussion -
- Career - 25 Most Difficult Job Interview Questions (and Answers):
- ibiblio.org - Brewing Java - Recursive methods
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java program "power" using a recursive method to calculate raising a number to a power
- Create a Java program "factorial" using a recursive method to display factorial up to 10
|
| 13 |
04/27/06 |
|
Thursday - Science, Java Arrays, "salary" |
|
- Classroom Discussion -
- Science - How Gas Prices Work from howstuffworks.com
- ibiblio.org - Brewing Java - Arrays
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java program "fibonacci"
- Create an integer array variable f
- Initialize the first two elements to one (1)
- Initialize the next element to the sum of the previous two
- Repeat until you have at least 20 elements initialized
- Display at least 20 elements separated by blank spaces
- Modify the Java program "salary"
- Create array variables for name, hw, pr, gp, tx, np
- Initialize each element for each employee
- Display all elements
|
| 14 |
04/28/06 |
|
Friday - Math, Java Multi-dimensional Array, Java Quiz, "grades" |
|
- Classroom Discussion -
- POSTPONED Ms. Verde will appear with a game called "Roman Number Bingo"
- practicalMoneySkills.com - free web site designed to help students practice better money management
- ibiblio.org - Brewing Java - Multi-Dimensional Arrays
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- POSTPONED UNTIL MONDAY QUIZ - Take the Java Quiz 1. Click the link & follow the instructions. PRINT & HAND IN. Open notes, open internet, open NetBeans IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student for help
- Check your Marking Period 4 grades & complete any incomplete programming labs
|
|
2 Weeks |
|
SkillsUSA State Competitions - Practice |
| 15 |
05/01/06 |
|
Monday - English, Java Try/Catch Exceptions, "temperature", May Day |
|
- Classroom Discussion -
- May Day webpage - wikipedia.org
- English - Ms. Gerrick will visit to discuss reading a technical article & writing a summary about the article
- English - Technical Article - >You Play World of Warcraft? You're Hired!
- ibiblio.org - Brewing Java - Catching Exceptions
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- QUIZ - Take the Java Quiz 1. Click the link & follow the instructions. PRINT & HAND IN. Open notes, open internet, open C++ IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student for help
- Modify the Java program "temperature" to catch exceptions:
- I can break this program by entering anything other than a number for a Fahrenheit temperature
- I get an error something like:
"Exception in thread "main" java.lang.NumberFormatException: For input string: "C"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)"
& the program stops running in "crash" mode
- Prevent this using the "try/catch" process
- Put "try { }" for Fahrenheit around the parse & function calls
- Add "catch (Exception e) { }" & display an appropriate error message
- Save & Test
- This fixes Fahrenheit but not Centigrade
- Put "try { }" for Centigrade around the parse & function calls
- Add "catch (Exception e) { }" & display an appropriate error message
- Save & Test
- I can break this program by entering nothing, just press enter, for "[F]ahrenheit or [C]entigrade"
- Put "try { }" for Centigrade around the parse & function calls
- Add "catch (Exception e) { }" & display an appropriate error message
- Save & Test
- I can break this program by entering nothing, just press enter, for "Play Again (Y/N)?"
- Put "try { }" for Centigrade around the parse & function calls
- Add "catch (Exception e) { }" & force the program to exit
- Save & Test
- Copy the source code file to "H:\Java" & rename it "temperature"
- PowerPoint
- Practice for the SkillsUSA web design contest
|
| 16 |
05/02/06 |
|
Tuesday - Vocabulary, Java File Input/Output Read, "salary" |
|
- Classroom Discussion -
- English, recap of yesterday's lesson
- To me, these are the important phrases from the article:
- potential for experiential learning
- accidental learning
- adjusting to a new culture
- accidental learning relies on failure
- [game players] become more flexible in thinking & more sensitive to social cues
- [game players] don't think of gameplay as training
- a total-immersion course in leadership
- adept at many skills
- provide real-world training
- willing to improvise [to] find people & resources needed to accomplish a task
- translate experience in the virtual world into success in the real one
- Summary -- The article shows, through example of Stephen Gillett, how Massive Multiplayer Online Role Playing Games can help develop leadership skills
- Explain the Importance -- Playing MMORPG may help develop the leaders of the future, especially if those playing don't realize that they're learning management skills
- Technology Vocabulary - a daily interest
- ibiblio.org - Brewing Java - File I/O & Streams
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Modify the Java program "salary" to read input from a text file:
- Employee name & pay rate are stored in the text file "employees.txt"
- Add "import java.io.*;" at the top
- Add a variable to name the input file: public static String inFileName = "employees.txt";
- Add the try/catch block to find & open the FileInputStream in the main:
try {
FileInputStream inFile = new FileInputStream(inFileName);
JOptionPane.showMessageDialog(null,"File " + inFileName + " Found");
// add DataInputStream code here
}
catch (Exception e) {
JOptionPane.showMessageDialog(null,"File " + inFileName + " Not Found");
}
- Save & Test
- What error do you get? None! The program can't find the file because you haven't created it yet! It's working!
- Create the text file in notepad & save it to the "salary" folder:
Adam 10.00
Beth 10.00
Chad 10.00
Dana 10.00
- Add a try/catch to open the data as a DataInputStream inside the FileInputStream try block:
try {
DataInputStream inData = new DataInputStream(inFile);
JOptionPane.showMessageDialog(null,"File " + inFileName + " Contains Data");
// add input code here
}
catch (Exception e) {
JOptionPane.showMessageDialog(null,"File " + inFileName + " Empty");
}
- Add a try/catch block around the main code inside the DataInputStream try block:
try {
while((str = inData.readLine()) != null) {
getEmpInfo(i);
gp = grossPay(i);
tx = taxes();
np = netPay();
showResults(i);
i++;
}
howMany = i - 1;
}
- Java has a special class called "StringTokenizer". The java.util.StringTokenizer class is used to
break strings into tokens (words, numbers, operators, or whatever). A more powerful solution is to
use regular expressions, which have been added to Java 1.4. A StringTokenizer constructor takes a
string to break into tokens and returns a StringTokenizer object for that string. Each time its
nextToken() method is called, it returns the next token in that string. If you don't specify the
delimiters (separator characters), blanks are the default
- Modify getEmpInfo() to get data from the Data Input Stream & use StringTokenizer to break the input
line into two pieces: name & payRate. Continue to get hoursWorked from the user at the keyboard:
StringTokenizer st = new StringTokenizer(str);
name[a] = st.nextToken();
str = st.nextToken();
pr[a] = Double.parseDouble(str);
str = JOptionPane.showInputDialog(null,"Enter Hours Worked for " + name[a]);
hw[a] = Double.parseDouble(str);
- Everything else stays the same
- Save & Test
- Copy the source code file to "H:\Java" & rename it "salary"
- PowerPoint
- Practice for the SkillsUSA web design contest
|
| 17 |
05/03/06 |
|
Wednesday - Career, Java File Input/Output Write, "salary" |
|
- Classroom Discussion -
- Career - Top 10 Best Jobs & Tech Wages Hit Highest Level in Five Years
- Career - Technical Article - You Play World of Warcraft? You're Hired! - Perform an online search for jobs where expertise in online role-playing would be a plus
- ibiblio.org - Brewing Java - File I/O & Streams
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Modify the Java program "salary" to write output to a text file:
- Continue to display output to the user using showMessageDialog() but also add output to a second file named "employeesPay.txt"
- Add a variable to name the output file: public static String outFileName = "employeesPay.txt";
- Add a try/catch block to open the FileOutputStream after all your existing input try/catches:
try {
FileOutputStream outFile = new FileOutputStream(outFileName);
JOptionPane.showMessageDialog(null,"Output File " + outFileName + " Created");
}
// add PrintStream code here
catch (Exception e) {
JOptionPane.showMessageDialog(null,"Unable to Create File " + outFileName);
}
- Add a try/catch block to open the output PrintStream inside the FileOutputStream try block:
try {
PrintStream outData = new PrintStream(outFile);
JOptionPane.showMessageDialog(null,"Output PrintStream Created for " + outFileName);
// add output code here
}
catch (Exception e) {
JOptionPane.showMessageDialog(null,"Unable to Create PrintStream for " + outFileName);
}
- Add a loop to process all the data in the arrays:
for(i=0;i<=howMany;i++) {
gp = grossPay(i);
tx = taxes();
np = netPay();
showResults(i);
}
- Remove the processes from the previous section
- Save & Test
- At this point you should be able to enter hours worked for all four employees (Adam, Beth, Chad, Dana)
& then see all four employees output message boxes
- The output file "employeesPay.txt" is still empty. Fill it after calling "showResults()":
outData.println(str);
- Save & Test
- Copy the source code file to "H:\Java" & rename it "salary"
- PowerPoint
- Practice for the SkillsUSA web design contest
|
| 18 |
05/04/06 |
|
Thursday - Science, Java Database Input/Output SELECT FROM, "testDataBase" |
|
- Classroom Discussion -
- Science - How Hybrid Cars Work from howstuffworks.com
- wikipedia.org - Java Database Connectivity
- planet-source-code.com - How to manipulate a Microsoft Access Database via JDBC (A Super Quick Overview of JDBC Basics)
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a new Java program "testDataBase" to SELECT FROM a database table using SQL:
- Use NetBeans to create the Java folders
- Start the setup for the program that will do two things: Show existing data or Add new data
- Create a loop in the "main()" to continue until the user chooses to exit
- Inside this loop, get input from the user for [A]dd or [S]how
- Receive the string input & change it into a character variable
- If 'A', call a method "addData()"
- Else if 'S', call a method "showData()"
- Else, tell the user "invalid input"
- We will work on the processes inside the methods during class today & tomorrow
- Temporarily, you may simply display a message dialog saying "Inside addData()" or "Inside showData()"
- Save & Test
- Connecting to a database is slightly more complex than reading/writing text files - it requires a database class, connection, & statement:
- Copy the database called "grades.mdb" from "Q:\pcProgramming\JavaExamples" to the root folder of the new program
- The database "grades.mdb" table "grades" consists of multiple records concerning many students. Each record is divided into fields:
- Field 1 is the student id number
- Fields 2 through 11 are number grades
- Field 12 is an average of the 10 grades (2-11)
- New import:
import java.sql.*; // for databases
- Global variables:
public static int i = 1, gr = 0;
public static String str = "", sql = "";
public static char ch = 'Y';
public static int[] gray = new int[11];
public static String dbName = "grades.mdb";
public static String tblName = "grades";
public static String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
- Code the "showData()" method:
- Use the try/catch block to safely catch errors & prevent program crashes:
try {
- Create the database connections:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
database += dbName.trim() + ";DriverID=22;READONLY=true}";
Connection con = DriverManager.getConnection(database ,"","");
Statement s = con.createStatement();
- Build the SQL statement to SELECT all fields from all records (remember any?):
sql = "SELECT * FROM " + tblName + ";";
- Run the SQL command:
s.execute(sql);
- This selects data from the database table - we can store the result into a variable called "rs":
ResultSet rs = s.getResultSet();
- If the result has data (is not empty), build an output str to display all data:
if (rs != null) {
while (rs.next()) {
str = "Student ID: ";
System.out.print(str + rs.getString(1));
str = "Grades: ";
System.out.print(str + rs.getString(2));
System.out.print(" " + rs.getString(3));
System.out.print(" " + rs.getString(4));
System.out.print(" " + rs.getString(5));
System.out.print(" " + rs.getString(6));
System.out.print(" " + rs.getString(7));
System.out.print(" " + rs.getString(8));
System.out.print(" " + rs.getString(9));
System.out.print(" " + rs.getString(10));
System.out.print(" " + rs.getString(11));
str = "Average: ";
System.out.println(str + rs.getString(12));
}
}
- End the method by catching any errors:
}
catch (Exception e) {
JOptionPane.showMessageDialog(null,e);
}
- PowerPoint
- Practice for the SkillsUSA web design contest
|
| 19 |
05/05/06 |
|
Friday - SkillsUSA, Java Database Input/Output INSERT INTO, "testDataBase"
Cinco de Mayo, Tomorrow is Tax Freedom Day in New Jersey |
|
- Classroom Discussion -
- SkillsUSA - PDP Level 1.3 "Time-Management Skills", cont'd
- SkillsUSA home page:
- Contest Descriptions - Web Design - Evaluates each contestant's preparation for employment & to recognize outstanding students for excellence & professionalism in the field of Web design
- Complete Web Design contest description
- Contest Updates - Web Design was approved as an official contest. The project for 2006 will entail each team building a completely working web site for a non profit agency with a theme that is consistent with this year's theme: the area of Employment. Focus on web site accessibility issues as outlined in the current Web Content Accessibility Guidelines (more information at http://www.w3.org/WAI/intro/wcag.php)
- Saturday, May 13th, guidelines
- PDP Workbook Level 1.5 Cultural Diversity & Equity
- wikipedia.org - Java Database Connectivity
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Modify the Java program "testDataBase" to INSERT INTO a database table using SQL :
- PowerPoint
- Practice for the SkillsUSA web design contest
|
|
Job Fair |
|
Seaside Heights Summer Job Fair, Sat. May 6th, 12pm – 4pm, Boardwalk & Webster Ave |
|
|
|
1 Week |
|
SkillsUSA State Competitions - Practice |
| 20 |
05/08/06 |
|
Monday - SkillsUSA, Java practice, "lastChanceGas", "change" |
|
- Classroom Discussion -
- SkillsUSA - PDP Level 1.3 "Time-Management Skills", cont'd
- SkillsUSA home page:
- Contest Descriptions - Web Design - Evaluates each contestant's preparation for employment & to recognize outstanding students for excellence & professionalism in the field of Web design
- Complete Web Design contest description
- Contest Updates - Web Design was approved as an official contest. The project for 2006 will entail each team building a completely working web site for a non profit agency with a theme that is consistent with this year's theme: the area of Employment. Focus on web site accessibility issues as outlined in the current Web Content Accessibility Guidelines (more information at http://www.w3.org/WAI/intro/wcag.php)
- Saturday, May 13th, guidelines
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java program "lastChanceGas" to determine if a vehicle can cross a desert withoug buying more gas:
- The user will enter the vehicle gas tank capacity
- The user will enter the vehicle miles per gallon
- The user will enter the vehicle gas tank percent full
- The desert is 200 miles across to the next gas station
- The program will determine & display if the user should fill up before starting across the desert
- Create a Java program "change":
- The user will enter total cost
- The user will enter amount tendered
- The program will determine & display change amount
- The program will display how many 20-dollar bills, how many 10-dollar bills, how many 5-dollar bills, how many singles, how many quarters, how many dimes, how many nickels, how many pennies
|
| 21 |
05/09/06 |
|
Tuesday - Vocabulary, Java practice, "microwaveTimer", "rook" |
|
- Classroom Discussion -
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Military recruiters in building today
- Create a Java program "microwaveTimer" to calculate time based on how many items are being warmed:
- The user will enter time to heat one item
- Time is a fractional amount, i.e. 1 minute 30 seconds is entered as 1.5 minutes
- The user will enter how many items to be heated, minimum 1, maximum 4
- To heat one item, normal time is used
- To heat each additional item, 1/2 normal time is added for each additional item
- Calculate & display total time for all items
- Create a Java program "rook" from the NJIT contest description to determine if a Rook on a chessboard can or cannot attack the King:
- All input data comes from a text file "inRook.txt", copy from the "Q:" drive
- Open the file for input
- Read the first line of input into an int variable "howMany"
- Loop for "howMany"
- Read the next line of input into a String variable "str"
- Transfer each character from str into an 8 by 8 character array "board"
- Display the board to the standard output
- Repeat for "howMany"
|
| 22 |
05/10/06 |
|
Wednesday - Career, Java practice, "charCounter", "" |
|
- Classroom Discussion -
- Career - Stupid Interview Questions (and Answers):
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java program "charCounter" to count how many consonants, vowels, punctuation characters, & spaces exist in an input text file:
- Save a copy of the Gettysburg Address in a text file "inGetty.txt" in the "charCounter" java folder
- Create int variables for consonants, vowels, punctuation, & spaces & initialize them all to zero
- Read each character from the input file & increment the correct variable
- Vowels are ' A ',' a ',' E ',' e ',' I ',' i ',' O ',' o ',' U ',' u '
- Punctuations are ' . ',' , ',' ? ',' ! ',' - ',' : ',' ; '
- Spaces are ' '
- Consonants are any other character
- Display the result
- Modify the Java program "rook":
- Determine if the King is already in check
- There may be other playing pieces between them blocking the Rook from the King
- If not, determine if the King can be placed in check within one move of the Rook
- The Rook may move horizontally to the same column as the King but may not move through another blocking piece
- If the Rook can move to the same column as the King, are there any other playing pieces between them blocking the Rook from the King?
-
- The Rook may move vertically to the same row as the King but may not move through another blocking piece
- If the Rook can move to the same row as the King, are there any other playing pieces between them blocking the Rook from the King?
-
- If not, the King cannot be placed in check within one move
- Display output
|
|
Job Fair |
|
Ocean County College, Southern Education Center, Wed. May 10th, 5pm – 7pm, 195 Cedar Bridge Road, Manahawkin |
|
|
| 23 |
05/11/06 |
|
Thursday - Science, Java practice, "signalSmoother", "reverser", "junkMail" |
|
- Classroom Discussion -
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java program "signalSmoother" to simulate the smoothing of a radio signal by using averaging to reduce peaks & valleys in the electronic signal:
- A radio signal consists of an indeterminate number of electronic signals
- Signals range in value from 0 to 100
- The first & last signal is 0
- Electro-magnetic interference from atmospheric storms can distupt the signal, changing individual values
- Reduce the interference through smoothing -- eliminate peaks & valleys
- Average a set of three consecutive signal values & report the average
- Open for input a text file "inSignal.txt"
- Open for output "outSignal.txt"
- Read the input data
- Write the average (smoothed) value to the output file
- Repeat until complete
- When you only have 1 number, skip it
- When you only have 2 numbers, average the two & write
- When you have 3 numbers, average the three & write
- For example, input file:
1 3 5 7 9 7 5 3 1
- Output file would look like this:
2 3 5 7 7 7 5 3 2
- Create a Java program "reverser" to print a famous backwards:
- Reverse each line of the Gettysburg Address
- Open for input "inGetty.txt"
- Open for output "outGetty.txt"
- Read a line from input
- Write the line reversed to the output
- Repeat until complete
- Create a Java program "junkMail" to generate a "personalized" e-mail message:
- An e-mail address consists of three parts: name, organization, domain
- Name is separated from organization by the "@" (at) symbol
- Organization is separated from domain by the '.' (period) symbol
- Write a Java program to separate an e-mail address into it's separate parts
- From the three parts, generate a form letter to an output file "outMail.txt"
- Fill in blanks in the form letter with name, organization, & domain from the e-mail address
|
| 24 |
05/12/06 |
|
Friday - Math, Java practice, "", "" |
|
- Classroom Discussion -
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Complete any incomplete Java programs
|
|
05/13/06 |
|
Saturday - SkillsUSA State Competitions - Guidelines:
- BUS LEAVES AT 5:30
- Assemble at Toms River Center beginning at 5:00 a.m.
- Web Design Competition location - Somerset Vocational School
- Dress Code: black slacks, black socks, black shoes, white dress shirt, black tie
- School-supplied red SkillsUSA sports coat
|
|
|
| 25 |
05/15/06 |
|
Monday - English, Java GUI, "helloWorld2" |
|
- Classroom Discussion -
- English - Ms. Gerrick will visit to discuss reading a technical article & writing a summary about the article
- English - Technical Article - The $100 Laptop Moves Closer to Reality
- Sams - Hour 13 - Building a Simple User Interface:
- Swing and the Abstract Windowing Toolkit
- Using Components
- Workshop: Creating Your Own Component
- Summary
- Q&A
- Quiz
- Activities
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Practice with visual java from Sams online textbook
- Create a Java program "helloWorld2" using GUI to get the user's name:
- Add a textbox "txtName" to allow for user input
- Add a label "lblName" to identify the textbox
- Add a button "cmdGo" to allow the user to click
- Add a checkbox "chkFun" labeled "I'm having fun"
- Add a checkbox button group "gender" with 2 checkboxes "chkMale" & "chkFemale" labeled appropriately
- Add a combo box "cboHomeSchool" with a couple of home schools listed (Brick, Jackson, Toms River, Central, Southern, etc.)
- Test
|
| 26 |
05/16/06 |
|
Tuesday - Vocabulary, Java GUI, "crisis", "lotto" |
|
- Classroom Discussion -
- Techincal Vocabulary - a Daily Routine
- Sams - Hour 14 - Laying Out a User Interface:
- Using Layout Managers
- Workshop: Laying Out an Application
- Summary
- Q&A
- Quiz
- Activities
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java program "crisis":
- Build the "crisis" program from Sams web page
- Test the FlowLayout
- Test the GridLayout
- Test the BorderLayout
- Consider: which of these three works best for the "crisis" program?
- Create a Java program "lotto":
- Build the "lotto" program from Sams web page
- Modify the layouts to make the program look even better
- Change the quick pick & personal choice to a combo box
- Change the start, stop, & reset command buttons to check boxes
- Add start, stop, & reset check boxes to a button group so that only 1 at a time can be checked
- Test
|
| 27 |
05/17/06 |
|
Wednesday - Career, Java GUI, "keyView", "lotto" |
|
- Classroom Discussion -
- Career - The 10 Best Jobs according to:
- Sams - Hour 15 - Responding to User Input:
- Getting Your Programs to Listen
- Setting Up Components to Be Heard
- Handling User Events
- Workshop: A Little Lotto Madness
- Summary
- Q&A
- Quiz
- Activities
- Four Steps to Add a Listener to Make Your Java GUI Program Interactive:
- // import event methods, add at top
import java.awt.event.*;
- // implement a listener as part of class
public class className extends JFrame implements ActionListener {
- // tell the component to listen
componentName.addActionListener(this);
- // add your own actionPerformed() method:
public void actionPerformed(ActionEvent e) {
if(e.getSource() == panicButton) {
textFieldName.setText("Aaaaaggggg...");
}
}
leepoint.net - Java Notes - a very comprehensive set of programming notes
Lab Assignment -
- Practice from Sams online text
- Modify your existing "crisis" Java program to display different messages when the user clicks a button:
- Open "crisis" in NetBeans
- Add & name a JTextField component to display output
- Add the import event line
- Add the listener to the class
- Add a line to tell the panicButton to listen
- Write the "actionPerformed()" overloaded method
- Tell what action to perform in "actionPerformed()" when an event is heard, like the user clicking on the panic button
- Add lines to tell the other four buttons to listen
- Tell what action to perform in "actionPerformed()" for each button click
- Test
- Create a Java program "keyView":
- Build a File New Project, Categories General, Projects Java Application named "keyView" from Sams source code web page
- Test
- Review
- Create a Java program "lotto":
- Build a File New Project, Categories General, Projects Java Application named "LottoMadness" program (use the 16 version) from Sams source code web page
- Create a File New File, Categories Java Classes, File Types Java Class named "LottoEvent" (use the 16 version) from Sams source code web page
- Test
- Review
|
| 28 |
05/18/06 |
|
Thursday - Science, Java GUI, "ColorSlide", "MenuDemo" |
|
- Classroom Discussion -
- Science - How Projection Television Works
- Sams - Hour 16 - Building a Complex User Interface:
- Scroll Panes
- Sliders
- Change Listeners
- Menus
- Workshop: Using Image Icons and Toolbars
- Summary
- Q&A
- Quiz
- Activities
- Sams Author's Source Code Web Site - a reference for text example programs without line numbers
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java program "ColorSlide":
- Build a File New Project, Categories General, Projects Java Application named "colorSlide" program (use the 16 version) from Sams source code web page
- Be sure to name the project correctly
- Create 3 "JTextField" for red, green, & blue
- Add the 3 "JTextField" to the proper color panel
- Write code in the method function "public void stateChanged(ChangeEvent evt) { }" to change the appropriate "JTextField" when a slider is changed
- Test
- Review
- Create a Java program "MenuDemo":
- Build a File New Project, Categories General, Projects Java Application named "MenuDemo" program (use the 16 version) from Sams source code web page
- Be sure to name the project correctly
- Create a "JTextField" for output
- Add the "JTextField component object to the container
- Add "implements ActionListener" to the class definition line
- Create a method function "public void actionPerformed(ActionEvent e) { }"
- Write code for each menu item in a nested "if" statement logic to display some appropriate message when a menu item is clicked
- Test
|
| 29 |
05/19/06 |
|
Friday - SkillsUSA, Java GUI Review & Quiz |
|
- Classroom Discussion -
- SkillsUSA - PDP Workbook Level 1.6 Define the Customer
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- QUIZ - Take the Java Quiz 2. Click the link & follow the instructions. PRINT & HAND IN. Open notes, open internet, open NetBeand IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student for help
- QUIZ Design, code, & test ONE of the following Java GUI visual programs
- QUIZ Create a Java GUI visual program "roomAreaGUI" to calculate the area of a room:
- Be sure to name the project correctly
- Remember all the imports
- Remember to extend JFrame & implement ActionListener
- Create all the components globally in the class but before the class constructor
- Use labels to identify empty text fields
- Use text fields for input of length & width
- Use a command button to execute the calculation
- Use a text field for output of area
- Add the components in the class constructor
- Remember to add an action listener to the command button
- Remember to create the actionPerformed() method with an ActionEvent variable in the parameter list
- "try" to convert text fields data to numerical variables
- After converting text to number, multiply width * length to get area
- Concatenate number area to an empty string to display onto an output text field
- "catch" & showMessageDialog any errors
- In "public static void main()" create a new variable of the class data type
- Test frequently
- (My program is 52 lines long & took 20 minutes to create & test)
- Save to H: drive
- QUIZ Create a Java GUI visual program "temperatureGUI" to convert from Fahrenheit to Centigrade & back:
- Be sure to name the project correctly
- Remember all the imports
- Remember to extend JFrame & implement ActionListener
- Create all the components globally in the class but before the class constructor
- Use labels to identify empty text fields
- Use text fields for input temperature
- Use 2 command buttons to let the user choose which conversion to execute
- Or use 2 check boxes (1 for FtoC & 1 for CtoF) & 1 command button to let the user choose
- Use a text field for output temperature
- Add the components in the class constructor
- Remember to add an action listener to the command button
- Remember to create the actionPerformed() method with an ActionEvent variable in the parameter list
- "try" to convert text field temperature to numerical temperature variable
- After converting text to number, perform the appropriate conversion
- Concatenate converted temperature number to an empty string to display onto an output text field
- "catch" & showMessageDialog any errors
- In "public static void main()" create a new variable of the class data type
- Test frequently
- Save to H: drive
- Review your grades & complete any incomplete Java programs
|
|
Job Fair |
|
Ocean County Mall Spring Job Fair, Sat. May 20th, 12pm – 4pm, in the Sears Wing |
|
|
| 30 |
05/22/06 |
|
Monday - SkillsUSA, Java Applets, "helloApplet", "temperatureApplet", "romanBingo" |
|
- Classroom Discussion -
- PDP Workbook Level 1.7, Benefits of Community Service
- Sams - Hour 17 - Creating Interactive Web Programs:
- Standard Applet Methods
- Putting an Applet on a Web Page
- A Sample Applet
- The Java Plug-in
- Sending Parameters from a Web Page
- Receiving Parameters in the Applet
- Workshop: Handling Parameters in an Applet
- Summary
- Q&A
- Quiz
- Activities
- Sams Author's Source Code Web Site - a reference for text example programs without line numbers
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- NetBeans has a built-in "appletviewer"
- Create a Java applet "helloApplet" to display "Hello World" on a web page in a Java applet:
- Choose File > New Project. Under Categories, select General. Under Projects, select Java Class Library. Click Next.
- Under Project Name, enter the name of your application "helloApplet". Change the Project Location to any folder on your computer.
- Click Finish. The IDE creates the project folder.
- Right-click the project node in the Projects window or Files window and select New File/Folder. Under Categories, select Java Classes. Under File Types, select JApplet or Applet. Click Next.
- Under Class Name, enter the name of your applet "helloApplet". Under Package, enter the package to which the applet will belong.
- Click Finish. The IDE creates the applet in the specified package. The applet opens in the Source editor.
- Type the code for your applet class, such as the following:
import java.applet.Applet;
import java.awt.Graphics;
public class helloApplet extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
- Right click the project node in the Projects window and choose Build Project from the pop-up menu.
- From NetBeans Help - Run an applet:
- Right-click an applet class in the Projects window or Files window.
- Select Run File from the pop-up menu.
- The "myappletclass.html" launcher file, with the applet embedded, is created in the build folder and launched in the Applet Viewer.
- The "myappletclass.html" launcher file in your build folder is overwritten each time you run or debug the applet. Therefore, do not modify the myappletclass.html launcher file in your build folder.
- To run without NetBeans in the same folder:
- Copy/move/rename the "\build\myappletclass.html" file to another folder
- Copy the "\build\classes\applet.class" file to the same folder
- Edit the "html" file & find & remove the reference to 'codebase="classes"'
- Open the "html" file & it should find & run the "class" file
- To run without NetBeans with the class file in a subfolder called "classes":
- Copy the "\build\myappletclass.html" file & the "classes" subfolder to another folder
- Open the "html" file & it should find & run the "class" file in the "classes" subfolder
- Click here for Mr. Clarke's hello world applet
- Experiment with "helloApplet" by adding some "JButton" & "JTextField" components to a content pane
|
| 31 |
05/23/06 |
|
Tuesday - Vocabulary, Java Applets cont'd, "distanceConverterApplet", "simpleCalculatorApplet", "romanBingo" |
|
- Classroom Discussion -
- Technology Vocabulary, every day
- Discuss the NetBeans "\build\classes" folder & how it works with "myappletclasshtml" file
- Sams - Hour 17 - Creating Interactive Web Programs, cont'd from yesterday
- Sams Author's Source Code Web Site - a reference for text example programs without line numbers
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- NetBeans has a built-in "appletviewer"
- Create a Java applet "simpleCalculatorApplet" to add/subtract/multiply/divide 2 numbers on a web page in a Java applet:
- Choose File > New Project. Under Categories, select General. Under Projects, select Java Class Library. Click Next.
- Under Project Name, enter the name of your application "simpleCalculatorApplet". Change the Project Location to any folder on your computer.
- Click Finish. The IDE creates the project folder.
- Right-click the project node in the Projects window or Files window and select New File/Folder. Under Categories, select Java Classes. Under File Types, select JApplet or Applet. Click Next.
- Under Class Name, enter the name of your applet "simpleCalculatorApplet". Under Package, enter the package to which the applet will belong.
- Click Finish. The IDE creates the applet in the specified package. The applet opens in the Source editor.
- Create the code for your applet class
- Use 2 text field for input & 1 text field not editable for output
- Use 4 buttons for add/subtract/multipy/divide
- Add the components to the container pane
- Implement the action listener in the class
- Listen for each button click
- Perform the proper math in the action performed
- Test frequently
- Test on a web page, like this
- Create a Java applet "temperatureApplet" to convert Fahrenheit to Centigrade & back on a web page in a Java applet
- Create a Java applet "distanceApplet" to convert distances (inches, centimeters, feet, meters, miles, kilometers) on a web page in a Java applet
- Create a Java applet "romanBingo" with random Roman numbers on a bingo card on a web page in a Java applet:
- 6 rows of 5 columns
- First row has "B", "I", "N", "G", "O" in the 5 columns
- Rows 2 - 6 have random numbers, written as Roman Numbers
- Column 1 has 5 random numbers between 1 to 20
- Column 2 has 5 random numbers between 21 to 40
- Column 3 has 5 random numbers between 41 to 60
- Column 4 has 5 random numbers between 61 to 80
- Column 5 has 5 random numbers between 81 to 100
- The center row/column intersection says "FREE"
- Use an array [0 to 31] of JButton components
- Change color from black to red on user click
|
| 32 |
05/24/06 |
|
Wednesday - Career, Java Threads, "primesAppler", "revolveAPplet", "romanBingo" |
|
- Classroom Discussion -
- Career - Compensation:
- Sams - Hour 19 - Creating a Threaded Program:
- Threads
- Working with Threads
- Starting with init()
- Catching Errors as You Set Up URLs
- Handling Screen Updates in the paint() Method
- Starting the Thread
- Handling Mouse Clicks
- Workshop: Revolving Links
- Summary
- Q&A
- Quiz
- Activities
- Sams Author's Source Code Web Site - a reference for text example programs without line numbers
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- NetBeans has a built-in "appletviewer"
- Create a Java applet "primesApplet" to add/subtract/multiply/divide 2 numbers on a web page in a Java applet:
- Choose File > New Project. Under Categories, select General. Under Projects, select Java Class Library. Click Next.
- Under Project Name, enter the name of your application "primesApplet". Change the Project Location to any folder on your computer.
- Click Finish. The IDE creates the project folder.
- Right-click the project node in the Projects window or Files window and select New File/Folder. Under Categories, select Java Classes. Under File Types, select JApplet or Applet. Click Next.
- Under Class Name, enter the name of your applet "primesApplet". Under Package, enter the package to which the applet will belong.
- Click Finish. The IDE creates the applet in the specified package. The applet opens in the Source editor.
- Copy the code from Sams Author's Source Code Web Site - a reference for text example programs without line numbers
- Test frequently
- Create a Java applet "revolveApplet" to display rotating web page links on a web page in a Java applet:
- Copy the code from Sams Author's Source Code Web Site - a reference for text example programs without line numbers
- Modify any lines necessary to add Mr. Clarke's OCVTS Computer Science web site
- Modify any lines necessary to add your favorite web site
- Speed up the frequency with which the site links change
- Change the color name & color numbers (RGB) to your choosing
- Use the passing/receiving parameter instructions from yesterday's lesson to pass the color name & color numbers from the web site
Create a Java applet "romanBingo" with random Roman numbers on a bingo card on a web page in a Java applet:
- 6 rows of 5 columns
- First row has "B", "I", "N", "G", "O" in the 5 columns
- Rows 2 - 6 have random numbers, written as Roman Numbers
- Column 1 has 5 random numbers between 1 to 20
- Column 2 has 5 random numbers between 21 to 40
- Column 3 has 5 random numbers between 41 to 60
- Column 4 has 5 random numbers between 61 to 80
- Column 5 has 5 random numbers between 81 to 100
- The center row/column intersection says "FREE"
- Use an array [0 to 31] of JButton components
- Change color from black to red on user click
|
| 33 |
05/25/06 |
|
Thursday - Science, Java Fonts, "player", "changer", "romanBingo" |
|
- Classroom Discussion -
- How the DaVinci Code doesn't work
- Sams - Hour 21 - Using Fonts and Color:
- Using the Font Class
- Using the Color Class
- Other Ways to Choose Colors
- Workshop: Displaying a Danger Message
- Summary
- Q&A
- Quiz
- Activities
- Sams Hour 21 Summarized:
- Font has three parameters (typeface or fontname, style i.e. bold or italics, fontsize)
- Font example: Font myFont = new Font("Serif", Font.ITALIC, 12);
- Use example: setFont(myFont);
- Sams Author's Source Code Web Site - a reference for text example programs without line numbers
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Open & modify the "helloWorldApplet"
- Change the font/style/size & color of the "Hello World!" statement
- Add the phrase "Java Applets are FUN!" & change the font/style/size & color
- Add the phrase "How Small is Too Small?" & change the font/style/size & color
- Add a phrase of your choosing & change the font/style/size & color
- Add a paragraph of your choosing & change the font/style/size & color
- Test & Save to "H:"
- Create a Java applet "romanBingo" with random Roman numbers on a bingo card on a web page in a Java applet:
- 6 rows of 5 columns
- First row has "B", "I", "N", "G", "O" in the 5 columns
- Rows 2 - 6 have random numbers, written as Roman Numbers
- Column 1 has 5 random numbers between 1 to 20
- Column 2 has 5 random numbers between 21 to 40
- Column 3 has 5 random numbers between 41 to 60
- Column 4 has 5 random numbers between 61 to 80
- Column 5 has 5 random numbers between 81 to 100
- The center row/column intersection says "FREE"
- Use an array [0 to 31] of JButton components
- Change color from black to red on user click
|
| 34 |
05/26/06 |
|
Friday - Math, Java Review, Java Quiz |
|
- Classroom Discussion -
- Ms. Verde will visit & we'll show her how our Roman Bingo game works & play a round or two
- Bingus Game
- Bingus Balls
- TicTacToe Game
- Sams - Online Text
- Sams Author's Source Code Web Site - a reference for text example programs without line numbers
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java applet "ticTacToeApplet"
- Complete any incomplete programs/GUI/applets
- COPY TO THE "H:" DRIVE
- Have a Great Weekend!!!
|
|
05/29/06 |
|
Monday - Memorial Day - No School |
|
|
| 35 |
05/30/06 |
|
Tuesday - Vocabulary, Jave More Simple GUI, "smiley" |
|
- Classroom Discussion -
- Some of the Graphics Methods() from java.sun.com:
- clearRect(int x, int y, int width, int height) -- Clears the specified rectangle by filling it with the background color of the current drawing surface
- setColor(Color c) -- Sets this graphics context's current color to the specified color
- setFont(Font font) -- Sets this graphics context's font to the specified font
- drawString(String str, int x, int y) -- Draws the text given by the specified string, using this graphics context's current font and color
- drawLine(int x1, int y1, int x2, int y2) -- Draws a line, using the current color, between the points (x1, y1) and (x2, y2) in this graphics context's coordinate system
- drawRect(int x, int y, int width, int height) -- Draws the outline of the specified rectangle
- fillRect(int x, int y, int width, int height) -- Fills the specified rectangle
- drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) -- Draws an outlined round-cornered rectangle using this graphics context's current color
- fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) -- Fills the specified rounded corner rectangle with the current color
- drawOval(int x, int y, int width, int height) -- Draws the outline of an oval
- fillOval(int x, int y, int width, int height) -- Fills an oval bounded by the specified rectangle with the current color
- drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) -- Draws the outline of a circular or elliptical arc covering the specified rectangle
- fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) -- Fills a circular or elliptical arc covering the specified rectangle
- drawPolygon(int[] xPoints, int[] yPoints, int nPoints) -- Draws a closed polygon defined by arrays of x and y coordinates
- fillPolygon(int[] xPoints, int[] yPoints, int nPoints) -- Fills a closed polygon defined by arrays of x and y coordinates
| Example:
|
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java applet "smiley" to allow the user to choose a happy face or a sad face:
- Remember your imports:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
- Two JButton components for happy & sad:
JButton happy = new JButton("Happy");
JButton sad = new JButton("Sad");
- Create the container & layout:
setSize(357,357);
Container pane = getContentPane();
FlowLayout flo = new FlowLayout();
pane.setLayout(flo);
setVisible(true);
setContentPane(pane);
- Add the buttons & listen for a user event:
pane.add(happy);
pane.add(sad);
happy.addActionListener(this);
sad.addActionListener(this);
- In the "actionPerformed()" method, draw a yellow circle for the face:
Graphics g = getGraphics();
g.setColor(Color.BLACK);
g.drawOval(50,50,250,250);
g.setColor(Color.YELLOW);
g.fillOval(51,51,248,248);
g.setColor(Color.BLACK);
- Get the source of the event (which button was clicekd) & react:
JButton sour = (JButton)ae.getSource();
if(sour == happy) {
g.fillRoundRect(100,100,50,50,20,20);
g.fillRoundRect(200,100,50,50,20,20);
g.fillOval(150,160,50,50);
g.fillArc(100,200,150,75,180,180);
}
- Create the code for the sad face in another "if" statement
- Test & Save & Copy to your "H:" drive
- -- add a JButton to change colors
- -- add a JButton to draw fangs on the smiley
|
| 36 |
05/31/06 |
|
Wednesday - Career, Jave More Simple GUI, "bouncyBall" |
|
- Classroom Discussion -
- QuintCareers.com -- Job Interview Tutorial for Job-Seekers
- javaBoutique.internet.com -- The Java Game Development Tutorial
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a Java applet "bouncyBall" to bounce a ball around an applet window:
- Follow the steps from javaBoutique.internet.com -- The Java Game Development Tutorial
- Modify to include a vertical (y_pos) movement
- Modify to bounce off walls
|
|
|
| 37 |
06/01/06 |
|
Thursday - Science, Jave More Simple GUI, "bouncyBall" cont'd |
|
- Classroom Discussion -
- How 3-D Graphics Works
- javaBoutique.internet.com -- The Java Game Development Tutorial
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Modify the Java applet "bouncyBall" from yesterday to bounce two balls around an applet window resolving any collisions:
- Add a second ball using x2_pos, y2_pos, moveRight2, moveDown2
- Resolve collisions using the Pythagoras Theorem when the balls don't align exactly
|
|
|
| 38 |
06/02/06 |
|
Friday - SkillsUSA, Jave More Simple GUI, "bouncyBall" cont'd |
|
- Classroom Discussion -
- The Mouse Listener:
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Modify the Java applet "bouncyBall" from yesterday to add a "paddle" & let the user control the paddle position with the mouse:
|
| 39 |
06/05/06 |
|
Monday - SkillsUSA, Open Source Modification |
|
- Classroom Discussion -
- SkillsUSA - PDP Blue Book - Lesson 1.11, List Proficiencies
- Definition: Open Source - from wikipedia.org
- How to Modify Open Source Software Applications - One Student's Demonstration
- Lab Assignment -
- Practice with the modified open source software
|
| 40 |
06/06/06 |
|
Tuesday - Vocabulary, EXAM, Java Tips, Last Day: Pinelands (Seniors) |
|
- Classroom Discussion -
- Technology Vocabulary - we do this every day
- Java Tips: javaWorld.com - short items on helpful tips & tricks to help you caffeinate your Java code
- Java Tips: ibm.com - what does mobile encryption involve?
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- FINAL EXAM - Take the Programming Completer exam. Click the link & follow the instructions. PRINT & HAND IN. Open notes, open internet, open VB/C++/NetBeans IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student for help
- On screen lab work
|
| 41 |
06/07/06 |
|
Wednesday - Career, Java Tips |
|
- Classroom Discussion -
- Career - practice interviews:
- Open & Read the following job posting
- dice.com - Entry Level Associate QA Engineer
- Compare your qualifications/experience/education with that required/desired/nice-to-have
- Go through a 10-minute practice interview with me acting as the hiring manager
- Java Tips: sonyericsson.com - tips, tricks and Code samples for creating Java™ ME Platform applications
- Java Tips: java.sun.com - archived issues of Java newsletters
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Update your résumé -- add the things you've learned & created
- Practive interview
- On screen lab work
|
| 42 |
06/08/06 |
|
Thursday - Science, Java Tips |
|
- Classroom Discussion -
- Science: How File Compression Works
- Java Tips: javaLobby.org - a group of people who share a common interest in Java software development
- Java Tips: tips-tricks.com - a handy guide for beginners
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Update your résumé -- add the things you've learned & created -- print & hand in -- graded lab
- Career - practice interviews -- graded lab:
- Open & Read the following job posting
- dice.com - Entry Level Associate QA Engineer
- Compare your qualifications/experience/education with that required/desired/nice-to-have
- Go through a 10-minute practice interview with me acting as the hiring manager
- Create a CD copy of all your work -- the "H:" drive will be erased over the summer
- On screen lab work
|
| 43 |
06/09/06 |
|
Friday - Math, Java Tips, Last Day: Brick, Lacey, Manchester, Southern (PM) |
|
- Classroom Discussion -
- practicalMoneySkills.com - free web site designed to help students practice better money management
- Java Tips: webReference.com - a collection of 30 coding tips
- Java Tips: java.sun.com - thirteen great ways to increase Java performance
- leepoint.net - Java Notes - a very comprehensive set of programming notes
- Lab Assignment -
- Create a CD copy of all your work -- the "H:" drive will be erased over the summer
- On screen lab work
|
| 44 |
06/12/06 |
|
Monday - English, Job Seeking Skills Post-Quiz, Cleanup, Last Day: Jackson, Point Beach (Seniors), Southern (AM), Toms River |
|
- Classroom Discussion -
- Classroom cleanup:
- Garbage into waste basket
- Borrowed items retuned -- CDs, pens, etc.
- Copy your programs/files/data
- Your last day? --> Take home your blue binders & black boxes; all of the printed work you've done this year
- Lab Assignment -
- Take the Job Seeking Skills Pre-Quiz. Click the link and follow the instructions. You get one shot at this one, but it doesn't count. This is the same as the one you took in September, to show you how much you've learned about job seeking
- Create a CD copy of all your work -- the "H:" drive will be erased over the summer
|
| 45 |
06/13/06 |
|
Tuesday - Vocabulary, Cleanup, Last Day: Lakewood |
|
- Classroom Discussion -
- Classroom cleanup:
- Garbage into waste basket
- Borrowed items retuned -- CDs, pens, etc.
- Copy your programs/files/data
- Your last day? --> Take home your blue binders & black boxes; all of the printed work you've done this year
- Lab Assignment -
- Create a CD copy of all your work -- the "H:" drive will be erased over the summer
|
| 46 |
06/14/06 |
|
Wednesday - Career, Cleanup, Last Day: Central, New Egypt, Pinelands (Juniors), Point Boro |
|
- Classroom Discussion -
- Classroom cleanup:
- Garbage into waste basket
- Borrowed items retuned -- CDs, pens, etc.
- Copy your programs/files/data
- Your last day? --> Take home your blue binders & black boxes; all of the printed work you've done this year
- Lab Assignment -
- Create a CD copy of all your work -- the "H:" drive will be erased over the summer
|
| 47 |
06/15/06 |
|
Thursday - Science, Cleanup, Last Day: All Post-Secondary Students, Certificate Ceremony - Toms River North - 12:30 p.m. |
|
- Classroom Discussion -
- Classroom cleanup:
- Garbage into waste basket
- Borrowed items retuned -- CDs, pens, etc.
- Copy your programs/files/data
- Your last day? --> Take home your blue binders & black boxes; all of the printed work you've done this year
- Lab Assignment -
|
| 48 |
06/16/06 |
|
Friday - No School |
|
|
| HAVE A GREAT SUMMER!!!
|
|
06/16/06 |
|
Java WebLinks - a collection of interesting & useful |
|
|