Marking Period 2

  Click for Instructions
Click on the date to open the details.
Click date again to close the details.
Day
Date
  Discussion
1
  Monday - Vocabulary & Introduction to JavaScript Programming
  1. Classroom Discussion -
    1. Vocabulary - Programming Terminology
    2. Introduction to Programming from ScotlandSoftware
    3. w3schools Introduction to JavaScript sections "home", "introduction", "how to", and "where to"
    4. I've put some good links to JavaScript programming on the References page
  2. Lab Assignment - All JavaScript assignments go into the "H:/JavaScript" folder
    1. Create a "Hello World" web page using HTML and JavaScript. Refer to the w3schools page for help. Call the web page "helloWorld.htm" and save it in the "H:/JavaScript" folder.
    2. Test the page; make it work before continuing
    3. Modify the "helloWorld.htm" web page. Use JavaScript to control the text formatting:
      1. Add your name,
      2. Add your email,
      3. Add your AIM screen name,
      4. Add a link to your "" page, make the link work
    4. Test the page; make it work

2
  Tuesday - PDP & JavaScript Variables
  1. Classroom Discussion -
    1. PDP Professional Development - Starter Kit Level 10 - Professional Development Traits
    2. w3schools Introduction to JavaScript sections "home", "introduction", "how to", and "where to"
    3. Coin70 JavaScript check out the appendices
  2. Lab Assignment -
    1. Modify "Kelsey's Diner" to use JavaScript to display the current date:
      1. Copy one of your "Kelsey's Diner" folders into your "H:/JavaScript" folder
      2. Add a JavaScript function to display the current date and time on the main page somewhere near the hours that the food is served
      3. Use the w3schools JavaScript Date Object page for a guide
      4. Test the page; make it work; make it look good

3
  Wednesday - Payroll Math & More JavaScript Variables
  1. Classroom Discussion -
    1. Math - Payroll on blackboard
    2. JavaScript Variables from w3schools.com
    3. JavaScript variables continued, from webmonkey
  2. Lab Assignment -
    1. Create a new webpage to simulate a cash register:
      1. Create a folder "H:/JavaScript/cashRegister1"
      2. Make a web page "cashRegister.htm"
      3. At Adam's Store, you purchase the following items:
        • Bananas, 1 pound, $1.00
        • Cheese, 1 package, $2.00
        • Dough, for pie, 1 box, $3.00
        • Eggs, 3 dozen, $4.00
        • Fruit Salad, large, $5.00
      4. Use JavaScript to add up all the items; keep a "running total"
      5. Display (on the web page) a list of all purchases with all prices
      6. Display the total price
      7. Test the page; make it work; make it look good

4
  Thursday - Movie & Review with Substitute Teacher
  1. Classroom Discussion - None
  2. Lab Assignment -
    1. Watch the movie "War Games"
    2. Submit a short handwritten review to the substitute teacher
    3. NO GAMES

5
  Friday - English & JavaScript Operators
  1. Classroom Discussion -
    1. Ms. Russen will visit and discuss how to read the classified help-wanted advertisements in the newspaper. What percentage of job openings are listed in the paper?
    2. JavaScript Operators
      • Arithmetic Operators ( + add, - subtract, * multiply, / divide, % modulus, ++ increment, -- decrement)
      • Assignment Operators (= assign, += add assign, -= subtract assign, *= multiply assign, /= divide assign, %= modulus assign)
      • Comparison Operators (== equals, != not equal, > greater than, < less than, >= greater than or equals, <= less than or equals)
      • Logical Operators (&& and, || or, ! not)
      • String Operator (+ string together)
  2. Lab Assignment -
    1. Create a new webpage to calculate salary:
      1. Create a folder "H:/JavaScript/Salary1"
      2. Make a web page "salary.htm"
      3. At Adam's Store, the following workers work these hours:
        • Beth works 30 hours
        • Chad works 40 hours
        • Dani works 50 hours
      4. Each worker earns $10 per hour
      5. Taxes and Social Security deductions run about 20%
      6. Use JavaScript to calculate gross pay, taxes, and net pay for all three workers
      7. Display (on the web page) everything (names, hours worked, pay rate, gross pay, taxes, and net pay) for each of the three workers
      8. Test the page; make it work; make it look good

6
  Monday - Vocabulary & JavaScript Decisions
  1. Classroom Discussion -
    1. Computer Vocabulary Quiz
    2. Order of Precedence / PEMDAS
    3. JavaScript "Prompt" and "Alert" from w3schools.com
    4. There are 3 types of program statements, with which we can write programs to solve any problem. Click inside each textbox:
      1) 2) 3)
    5. JavaScript Decisions, from w3schools.com, we see there are three types of decision statements:
      1. if
      2. if else
      3. switch case
  2. Lab Assignment -
    1. Computer Vocabulary Quiz 3 (all terms are computer-related)
    2. Copy your "salary1.htm" web page to "salary2.htm" and modify it to let the user enter the number of hours worked and also calculate overtime pay. Overtime is calculated at 1.5 normal pay for any hours over 40. There are two ways to calculate overtime. Both result in the same answer. Choose one:
      Method 1 (hoursWorked * payRate) + ((hoursWorked - 40) * payRate * .5)
      Method 2 (40 * payRate) + ((hoursWorked - 40) * payRate * 1.5)
      1. Test using the same hours worked from Friday last
      2. Beth will gross $300, pay taxes of $60, and net $240
      3. Chad will gross $400, pay taxes of $80, and net $320
      4. Dani should gross $550 ($500 normal pay plus $50 overtime pay), pay taxes of $110, and net $440
      5. Make it work. Make it look good.

7
  Tuesday - PDP & JavaScript Decisions, cont'd
  1. Classroom Discussion -
    1. PDP Professional Development - Starter Kit Level 10 - Professional Development Traits, Conclusion
    2. JavaScript Decisions, cont'd, from w3schools.com
      1. if
      2. if else
      3. switch case
    3. Nested if statements
  2. Lab Assignment -
    1. Create a new folder called "H:/JavaScript/Grades" for a new webpage called "grades1.htm". This page will prompt the user for a number input between 0 and 100 and calculate a letter grade for students in Adam's School according to the following grading chart:
      90 - 100
      80 - 89
      70 - 79    
      60 - 69
      0 - 59
    2. Test for many possibilities: (105, 100, 99, 95, 90, 89, 85, 75, 65, 55, 0, -5)
    3. Make it work. Make it look good.

8
  Wednesday - Math & JavaScript Decisions, cont'd
  1. Classroom Discussion -
    1. Math with - on Calculating Change
    2. The JavaScript Math function "floor()" from w3schools.com
    3. JavaScript Decisions, cont'd, from w3schools.com
      1. if
      2. if else
      3. switch case
    4. Boolean Logic or Multiple Comparisons:
  2. Lab Assignment -
    1. Math worksheet
    2. Copy your "cashRegister1.htm" to "cashRegister2.htm". Modify it to prompt the user and accept input for items purchased.
      1. The user purchased $58.80 worth of music CDs
      2. Add 6% tax to your total ($62.33)
      3. Display total price to the user and prompt for amount tendered
      4. The user will pay with a $100.00 dollar money order
      5. Calculate and display change ($37.67)
      6. Calculate the number of $20 bills, $10 bills, $5 bills, $1 bills, quarters, dimes, nickels, and pennies. This requires division and modulus:
        How Many?Reduce Change
        howMany = Math.floor(change / denomination)change = change % denomination
        37.67 / 20 = 137.67 % 20 = 17.67
        17.67 / 10 = 117.67 % 10 = 7.67
        7.67 / 5 = 17.67 % 5 = 2.67
        2.67 / 1 = 22.67 % 1 = 0.67
        0.67 / .25 = 20.67 % .25 = 0.17
        0.17 / .1 = 10.17 % .1 = 0.07
        0.07 / .05 = 10.07 % .05 = 0.02
        0.02 / .01 = 20.02 % .01 = 0.0
      7. Display to the user
      8. Make it work. Make it look good.

11/25/04
Thursday - No School - Thanksgiving Day Holiday Happy 50th Birthday, Mr. Clarke
11/26/04
Friday - No School - Thanksgiving Day After HolidayFunny, it doesn't feel any different
9
  Monday - Vocabulary review & JavaScript Loops
  1. Classroom Discussion -
    1. Today's vocab page
    2. Review:
      The three types of statements in programming: 1) 2) 3)
      The three types of decisions in programming: 1) 2) 3)
      The three types of loops in programming: 1) 2) 3)
    3. Loop - A sequence of instructions that repeats either a specified number of times or until a particular condition is met.
      1. functionX JavaScript Loops
      2. w3schools JavaScipt Loops
      3. WebDeveloperNotes JavaScript Loops
      4. Macromedia JavaScript Loops
  2. Lab Assignment -
    1. No vocabulary quiz today
    2. On-screen labwork to practice using loops: counting to 10 and drawing stars
    3. Create a web page called "timesTables.htm" to display the times table (1 - 12) of a number the user enters (1 - 12)
    4. EXTRA PRACTICE Create a web page called "factorial.htm" to display factorial of a number the user enters

10
  Tuesday - PDP Level 2-1, Goals & JavaScript Loops, cont'd
  1. Classroom Discussion -
    1. Discus Professional Development
    2. Review Loops from Monday
    3. Work exercises from WebDevelopers JavaScript Loops in class on-screen
  2. Lab Assignment -
    1. On-screen practice with loops
    2. Copy "cashRegister2.htm" to "cashRegister3.htm". Modify to add a loop that allows the user to enter purchase price of items:
      1. Declare a new variable "var anyMore = 'Y'"
      2. Start a loop "while(anyMore == 'Y') {"
      3. Keep a running total of items purchased.
      4. Prompt the user "anyMore = prompt('Do you have any more purchases? (Y/N)','y');"
      5. The loop will end when the user enters something other than 'Y'
      6. End the loop when the user says there are no more items to be purchased.
      7. The rest of the page is the same: display total amount purchased, prompt for amount tendered, display change due, and calculate proper change (20's, 10's, etc.)
      8. Make it work. Make it look good.

11
  Wednesday - Math & JavaScript Functions
  1. Classroom Discussion -
    1. Math - Practical Money Skills Banking Services on-screen lesson
    2. JavaScript Functions - a function is defined by webopedia.com as "a named section of a program that performs a specific task". You can reduce the amount of lines in your code (and the size of your file) by using functions. A function has the following characteristics:
      A function:
    3. Web sites with good tutorials about JavaScript functions:
      1. dwfaq
      2. CompTechDoc
      3. htmlite
      4. WebDeveloperNotes
      5. w3schools
      6. quirksmode
      7. functionX
      8. Netscape
  2. Lab Assignment -
    1. On-screen practice creating and using functions
    2. Copy "salary2.htm" to "salary3.htm" and modify to use functions to reduce the amount of coding:
      1. Create a function to calculate pay
      2. Copy the calculate pay statements into the function
      3. Delete the calculate pay statements from the remainder of the program
      4. Call the calculate pay function instead
      5. Create a function to display pay
      6. Copy the display pay statements into the function
      7. Delete the display pay statements from the remainder of the program
      8. Call the display pay function instead
      9. Make it work. Make it look good.
      10. Figure out by how many lines of code you have reduced your program
      11. Is the "salary3.htm" file size any smaller than "salary2.htm" (mine is half as big, 2k vs. 4k)

12
  Thursday - Science & JavaScript Functions, cont's
  1. Classroom Discussion -
    1. Science of How Instant Messaging Works
    2. Some more JavaScript tutorial websites:
      1. HTML Goodies JavaScript Primer
      2. JavaScriptKit.com
      3. PageResource.com
      4. JavaScript.com
      5. Web Developers' Virtual Library
      6. WebTeacher.com JavaScript for the Non-Programmer
      7. Internet.com JavaScript Tutorials
      8. WebReference.com JavaScript

      9. and, of course, the original, the creator, the one, (remember, there is no spoon)
      10. Netscape JavaScript
  2. Lab Assignment -
    1. More on-screen function examples
    2. Create a new "cashRegister4.htm" web page that will use input, calculations, decisions, loops, and functions to simulate a real cash register:
      1. One of the rules for using global variables inside functions is to declare all your variables before your functions. Think about the older cash registers and declare variables for purchasePrice, totalPurchase, amountTendered, and change. Also declare a sentinel variable to control a loop whether there are more purchases
      2. Declare a function to get purchases using global variables:
        1. Prompt the user for the purchasePrice
        2. Check that it is a number
        3. Display the purchasePrice on the browser
        4. Display the totalPrice on the browser
        5. Add it to the totalPurchase
      3. Create a loop and inside
        1. Call the function
        2. Ask the user if there are more purchases
      4. Test it to make it work
      5. Display the final totalPurchase on the browser
      6. Prompt the user for an amountTendered
      7. Display the amountTendered on the browser
      8. Calculate the change
      9. Display the change on the browser
      10. Test it to make it work
      11. Declare a function to calculate change:
        1. Receive arguments [inside the parenthesis] for size and currency
        2. size is the size of the change amount [20, 10, 5, 1, 0.25, 0.10, 0.05, and 0.01]
        3. currency is the words part ["twentys","tens","fives","ones","quarters","dimes","nickels","pennies"]
        4. Calculate the number of size of currency [var nsc = Math.floor(change/size)]
        5. Display number of size of currency and the words on the browser [document.write(nsc + currency + "<br>"]
        6. Use modulus and size to modify the change variable
      12. Call the calculate change function passing arguments 20 and "twenty"
      13. Test it to make it work
      14. Call the calculate change function for the rest of the currency size amounts
      15. Test it to make it work
      16. Make it look good

13
  Friday - English & JavaScript Quiz & JavaScript Functions, cont's
  1. Classroom Discussion - Movie "A Beautiful Mind" with Mr. Pobuta's class
  2. Lab Assignment -

14
  Monday - Vocabulary Quiz & JavaScript Functions, cont'd
  1. Classroom Discussion -
    1. Vocab Quiz
    2. JavaScript - Functions that return a value may be used:
      1. on the right side of an assignment
      2. in a condition
      3. as an argument to another function
      some internet tutorials:
      1. UniversityOfPittsburgh
      2. YourHtmlSource
      3. QuirksMode
      4. WebReference
      5. SusquehannaUniversity
      6. InternetRelatedTechnologies - WOW!
  2. Lab Assignment -
    1. Computer Vocabulary Quiz 4 (all terms are computer-related)
    2. Copy your "grades1.htm" web page to "grades2.htm" and modify it to use functions that return a value:
      1. Create a function with one argument called "getGPA()"
      2. On-screen practice
      3. Use a "select case" decision statement to determine which letter was used (A-F) and return a number between 0.0 and 4.0:
        • 'A' = 4.0
        • 'B' = 3.0
        • 'C' = 2.0
        • 'D' = 1.0
        • 'F' = 0.0
      4. Call the function inside a "document.write()", be sure to pass the argument (letterGrade)
      5. Test it to make it work
      6. Make it look good

15
  Tuesday - Math & JavaScript Forms
  1. Classroom Discussion -
    1. The concept of Random Numbers - a truly random number is one that cannot be predicted with any accuracy. In a series of random numbers, the series has no predictable pattern, the numbers are independent, with no correlation between successive numbers. Some websites about randon numbers:
    2. Four steps to generate pseudo-random numbers in JavaScript:
      • Math.random() returns a number between 0 and 1
      • Multiply by one greater than the range of numbers, if 0 to 5, multiply by 6
      • Add to reach the starting number, for 1 to 6, add 1
      • Math.floor() removes the decimal points
    3. Examples:
      ranNum = Math.floor(Math.random()); // returns a 0
      ranNum = Math.floor(Math.random() * 2); // returns a number between 0 and 1
      ranNum = Math.floor(Math.random() * 10); // returns a number between 0 and 9
      ranNum = Math.floor(Math.random() * 10 + 1); // returns a number between 1 and 10
      ranNum = Math.floor(Math.random() * 6 + 1); // returns a number between 1 and 6
      ranNum = Math.floor(Math.random() * 100); // returns a number between 0 and 99
      ranNum = Math.floor(Math.random() * 100 + 1); // returns a number between 1 and 100
      ranNum = Math.floor(Math.random() * 50 + 25); // returns a number between 25 and 75
      
    4. Some pseudo-random number web sites:
    5. JavaScript and Forms:
    6. Online Textbook Using JavaScript by Mark C. Reynolds
  2. Lab Assignment -
    1. On-screen practice with JavaScript pseudo-random numbers:
      1. Create a web page called "randomDemo.htm" using JavaScript to generate and display a pseudo-random number
      2. Modify "random.htm" to generate and display 100 pseudo-random numbers between 0 and 9
      3. Add onto "random.htm" to simulate flipping a coin 1000 times, count how many times you get heads vs. tails, display your results
      4. Add onto "random.htm" to simulate rolling two dice, display a list of 5 pairs of numbers between 1 and 6
    2. On-screen practice with JavaScript and Forms:
      1. Create a web page called "formDemo.htm" using JavaScript and forms
      2. Add a form button object, onClick call a function to display an alert box message "You Clicked On Me"
      3. Add a text box object for First Name, add a button object, onClick call a function to display the name in an alert box, change the name to "HaHaHa"
      4. Modify the text box button to validate user input field not empty and set the focus if empty
      5. Add two radio button objects for Male or Female, add a button object, onClick call a function to display the checked radio button in an alert box
      6. Validate that one radio button is checked
      7. Add a select option object for Grade Requested (A, B, C, or Other), add a button object, onClick call a function to display the selected option in an alert box
      8. Validate that one option is selected
      9. Add seven checkboxes for Favorite Pets, add a button object, onClick call a function to display the checked pets in an alert box
      10. No validation, the user may choose to check none of the checkboxes

16
  Wednesday - PDP & JavaScript Forms, cont'd
  1. Classroom Discussion -
    1. PDP, Book 2, Level 2, Stress Sources
    2. w3schools.com JavaScript & Forms examples
  2. Lab Assignment -
    1. PDP worksheet
    2. Lab - "coinToss.htm" - Create a new web page and write the HTML and JavaScript code to simulate tossing a coin and display the results in textboxes:
      1. Add a form, give it a unique name
      2. Add two textboxes for heads and tails, give them each a unique name
      3. Add a button for "Flip Coin"
      4. When the user clicks on "Flip Coin", run a function to simulate flipping a coin 1000 times, count heads and tails, and display the heads and tails results in the textboxes
      5. Test
      6. Make it look good
    3. Lab - "dice.htm" - Create a new web page and write the HTML and JavaScript code to simulate rolling a pair of dice and display the results in textboxes:
      1. Add 18 textboxes in three columns, Die 1, Die2, and Total, give them each a unique name. This would be a good place to copy and paste and change a name
      2. Add a button for "Roll Dice"
      3. When the user clicks on "Roll Dice", run a function to simulate rolling two dice 6 times, and display the results in the 12 die1 and die2 textboxes
      4. Display a total for each pair of dice in the corresponding total textbox
      5. Test
      6. Make it look good
    4. Lab - "guessMyNumber.htm" - Create a new web page and write the HTML and JavaScript code to simulate a number guessing game and display the results in textboxes:
      1. Give it a try
      2. Break the problem into small steps
      3. Continue making smaller steps until you can't break any steps any further
      4. Write the HTML and JavaScript code for each step
      5. Be sure to provide the user with plenty of feedback and information
      6. Test
      7. Make it look good

17
  Thursday - Science & JavaScript Tricks
  1. Classroom Discussion -
    1. How WiMAX Works
    2. University of Maryland JavaScript Events
    3. JavaScript Tricks - window
    4. JavaScript Tricks - browser
    5. JavaScript Tricks - frame
    6. JavaScript Tricks - string
    7. JavaScript Tricks - date
    8. JavaScript Tricks - math
  2. Lab Assignment -
    1. On-screen practice with some of the JavaScript Tricks listed above
    2. Work on the labs from yesterday
    3. Start thinking about next week's Holiday project, a multi-page website with loads of information and pictures about the coming holiday season. On Monday you will complete and submit a project proposal along the lines of Wilson Internet Website Planning Worksheet
    4. . Purpose, Organization, Graphics, Colors, Navigation, Page Elements, and (Photos, Graphics, Animations, Sound, and Video)

18
  Friday - English & JavaScript Tricks, cont'd
  1. Classroom Discussion -
    1. Engrish - Anagrams - A word or phrase formed by reordering the letters of another word or phrase:
    2. And if those listed above don't work, try these (courtesy of PBBT.com):
    3. Some more tricks - see yesterday
  2. Lab Assignment -
    1. On-screen practice with some of the JavaScript Tricks listed above
    2. Work on the labs from Wednesday
    3. Continue thinking about next week's Holiday project, a multi-page website with loads of information and pictures about the coming holiday season. On Monday you will complete and submit a project proposal along the lines of Wilson Internet Website Planning Worksheet
    4. . Purpose, Organization, Graphics, Colors, Navigation, Page Elements, and (Photos, Graphics, Animations, Sound, and Video)

19
  Monday - Holiday Web Site Project
  1. Classroom Discussion - None
  2. Lab Assignment -
    1. Complete on-line then print and hand-in my Web Site Planning Form. I will grade and return them.
    2. Begin design of a Holiday WebSite worth 50pts to be completed by and reviewed in class on Friday.
      1. Define the objective of your site by completing the web site planning form listed above. Defining your goals will help shape the design and functionality
      2. Make a list of features you want on the site - make your site distinctive and unique
      3. Think about content - what you want to communicate to visitors
      4. Create a folder called "css##-holiday" on "H:/" and put all your work and images there
      5. Assemble site content - gather together any text, graphics, or other materials you want and put everything in the same folder
      6. Research the competition - perform searches for similar websites
      7. Make it look good. Use images and content from other internet websites
      8. use some JavaScript techniques
      9. Test (preview) your web page frequently
      10. Save your file frequently
      11. You have four days to finish this assignment. Do your best, take your time, but DON'T DAWDLE
      12. On Friday we will evaluate each other's websites
    3. Check your grades and complete any incomplete labs, quizzes, worksheets
    4. Think of some simple games that you want to try and design for web pages next week (you have to give me a couple of days to see if I can make them work) MClarke@mail.ocvts.org

20
  Tuesday - Holiday Web Site Project
  1. Classroom Discussion - None
  2. Lab Assignment -
    1. Work on your holiday web site
    2. Check your grades and complete any incomplete labs, quizzes, worksheets
    3. Think of some simple games that you want to try and design for web pages next week (you have to give me a couple of days to see if I can make them work) MClarke@mail.ocvts.org

21
  Wednesday - Holiday Web Site Project
  1. Classroom Discussion - None
  2. Lab Assignment -
    1. Work on your holiday web site
    2. Check your grades and complete any incomplete labs, quizzes, worksheets
    3. Think of some simple games that you want to try and design for web pages next week (you have to give me a couple of days to see if I can make them work) MClarke@mail.ocvts.org

22
  Thursday - Holiday Web Site Project
  1. Classroom Discussion - None
  2. Lab Assignment -
    1. Work on your holiday web site
    2. Check your grades and complete any incomplete labs, quizzes, worksheets
    3. Think of some simple games that you want to try and design for web pages next week (you have to give me a couple of days to see if I can make them work) MClarke@mail.ocvts.org

23
  Friday - English with Ms. Russen and Holiday Web Site Project
  1. Classroom Discussion -
    1. English - Ms. Russen will visit to discuss Cover Letters that accompany the résumé
  2. Lab Assignment -
    1. On-screen evaluation of this week's holiday web sites
    2. Think of some simple games that you want to try and design for web pages next week (you have to give me a couple of days to see if I can make them work) MClarke@mail.ocvts.org

24
  Monday - Vocabulary & JavaScript Games
  1. Classroom Discussion -
    1. tekmom.com vocabulary buzzwords
    2. foldoc - free on line dictionary of computing
    3. w3schools.com array
  2. Lab Assignment - Four days; four games; one per day. Then, thankfully, winter break:
    1. Create a JavaScript web page to play the game "FORTUNE TELLER". The objective of "FORTUNE TELLER" is to have the computer display random answers to player questions. The player will ask a question, click a button, and the computer will randomly choose an answer to the player question. Some ideas:
      1. Make up eight fortune answers to questions
      2. Have a button for the player to click
      3. Prompt the player for a question that the fortune teller will answer
      4. Get a random number between 1 and 8 to randomly choose one of the eight answers
      5. Display the question and the answer to the player
      6. Have a button for the player to play again
      7. Test frequently
      8. Make it work
      9. Make it look good
    2. Create a JavaScript web page to play the game "TIC-TAC-TOE". The objective of "TIC-TAC-TOE" is to get three in a row. Two players alternate play, choosing one of nine spaces arranged in a three by three grid. Some ideas:
      1. Easiest is to click on a button and change the image to "X" or "O"
      2. Draw a playing board of nine images arranged three wide by three high
      3. Player X always goes first, clicks on one image, change that image to "X"
      4. Player O goes next, clicks on another image, change that image to "O"
      5. Alternate until one player wins or all nine images on the grid have been changed
      6. Determine if you have a winner after each click image change
      7. Give one point to the winner, player X or player O
      8. Have a way to reset the grid to play again
      9. Display current scores
      10. Test frequently
      11. Make it work
      12. Make it look good
    3. Create a JavaScript web page to play the card game "WAR". The objective of "WAR" is for two players to play one card each randomly and compare them. The player with the higher card receives one point score. After 26 cards have been played, the player with the highest score wins. Start with a normal deck of 52 playing cards with four suits (Clubs, Diamonds, Hearts, Spades) and 13 cards in each suit (Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King, Ace). The computer will randomly deal 26 cards to two players. Cards will be revealed two at a time, one from each player. The high card in each pair will win the round. Each round results in a point to the winner. Ties are null; neither player wins the round. The player with the highest score at the end of the 26 rounds wins overall. Some ideas:
      1. Start with 52 cards
      2. Get a random number between 1 and 52 to deal the first card to player 1
      3. After dealing the first card, there are only 51 cards left in the deck
      4. Reduce the size of the deck
      5. Get a random number 1-51 to deal the next card to player 2
      6. Repeat until no cards left
      7. Each player receives 26 cards, randomly chosen. Leave them random
      8. Take the first card from each player and compare them
      9. The player with the higher value card gets a point added to his total
      10. Ties are ignored, so it's possible for both player's scores to add up to less than 26
      11. After 26 rounds, use the player scores to determine which player has won
      12. Display outcome of game
      13. Have a way to re-deal the deck so the players may play again
      14. Test frequently
      15. Make it work
      16. Make it look good
    4. Create a JavaScript web page to play the card game "BLACKJACK". The objective of "BLACKJACK" is for one player to beat the computer, who is acting as the dealer, by adding the cards up and achieving a score closer to 21 but not over. Start with a normal deck of 52 playing cards. The computer will randomly deal two cards to a player and the computer (which will be the dealer). Player will see his cards but not the computer's cards. Player may choose to receive additional cards [hit me], one at a time, up to a total of five cards. When the player chooses to [hold], the computer will display its cards. The computer will decide to receive additional cards while computer total is 16 or under. When the computer holds, the totals are calculated and the player wins if his total is greater than the computer's, otherwise the computer wins. Play ends when all 52 cards have been used. Some ideas:
      1. Start with 52 cards
      2. Use the technique from "WAR" described above
      3. Randomly deal two cards to the player and two to the computer/dealer
      4. Remember to reduce the size of the deck after each deal
      5. Design a button for the player to receive additional cards [hit me]
      6. Display each card value to the player as the card is received
      7. Design a button for the player to choose to [hold]
      8. Display the computer cards
      9. Calculate the total of the computer cards
      10. While 16 or under, randomly deal another card to the computer
      11. Calculate the total of the player cards and computer cards to determine the winner of the hand
      12. If the player total is higher than the computer total, without going over 21, the player wins a point
      13. If the computer total is the same or higher than the player total, without going over 21, the computer wins a point
      14. If player goes over 21, computer wins automatically and does not draw additional cards
      15. If computer goes over 21, (can only happen if player is under 21 and [holds], player wins
      16. Play again using the reduced size of deck
      17. When the cards run out, determine a round winner one last time
      18. Determine whether player or computer has a higher score
      19. Display outcome of game
      20. Have a way to re-deal the deck so the game may play again
      21. Test frequently
      22. Make it work
      23. Make it look good

25
  Tuesday - PDP & JavaScript Games
  1. Classroom Discussion -
    1. PDP - Level 2.2 - Characteristics of a Positive Image
  2. Lab Assignment -
    1. On-screen lab to create a JavaScript web page to play the card game "BLACK JACK"

26
  Wednesday - Math & JavaScript Games
  1. Classroom Discussion -
    1. Ms. DiPierro will visit to discuss ...
  2. Lab Assignment -
    1. On-screen lab to create a JavaScript web page to play the card game "TIC-TAC-TOE"

27
  Thursday - Science & JavaScript Games
  1. Classroom Discussion -
    1. how snowmakers work
  2. Lab Assignment -
    1. On-screen lab to create a JavaScript web page to play the card game "FORTUNE TELLER"
    2. Continue working on any unfinished JavaScript web page games

12/24/04
Friday - No School - Winter Break - Christmas Eve
  • Students' Holiday Pages
  • 12/27/04
    Monday - No School - Winter Break
    12/28/04
    Tuesday - No School - Winter Break
    12/29/04
    Wednesday - No School - Winter Break
    12/30/04
    Thursday - No School - Winter Break
    12/31/04
    Friday - No School - Winter Break - New Year's Eve
    28
      Monday - Vocabulary & CSS & Students' Holiday Pages
    1. Classroom Discussion -
      1. Take the Computer Vocabulary Quiz in the lab
      2. Prepare for Friday:
      3. CSS - Cascading Style Sheets - Learn how to use CSS to control the style and layout of multiple Web pages all at once:
      4. NJIT High School Programming Contest
    2. Lab Assignment -
      1. Computer Vocabulary Quiz 5 (all terms are computer-related)
      2. On-screen CSS practice create a web page "helloWorldCSS.htm" using CSS techniques
      3. Extra Practice: Problem 1

    29
      Tuesday - PDP & CSS & Students' Holiday Pages
    1. Classroom Discussion -
      1. Professional Development - Level 2.4 – Awareness of Government, Professional Organizations, and Trade Unions
      2. Prepare for Friday:
      3. CSS - Cascading Style Sheets - Learn how to use CSS to control the style and layout of multiple Web pages all at once:
    2. Lab Assignment -
      1. On-screen CSS practice modify web page "helloWorldCSS.htm" and use CSS techniques to modify it
      2. Extra Practice: Problem 2

    30
      Wednesday - Math & CSS & Students' Holiday Pages
    1. Classroom Discussion -
      1. Math - Practical Money Skills About Credit On-screen lesson
      2. Prepare for Friday:
      3. CSS - Cascading Style Sheets - Learn how to use CSS to control the style and layout of multiple Web pages all at once:
    2. Lab Assignment -
      1. On-screen CSS practice modify web page "helloWorldCSS.htm" and use CSS techniques to modify it
      2. Extra Practice: Problem 3

    31
      Thursday - Science & CSS & Students' Holiday Pages
    1. Classroom Discussion -
      1. Science of How Time Works
      2. Prepare for Friday:
      3. CSS - Cascading Style Sheets - Learn how to use CSS to control the style and layout of multiple Web pages all at once:
      4. JavaScript - Review
    2. Lab Assignment -
      1. On-screen CSS practice modify web page "helloWorldCSS.htm" and use CSS techniques to modify it
      2. Extra Practice: Problem 4

    32
      Friday - English & CSS & Students' Holiday Pages
    1. Classroom Discussion -
      1. Ms. Russen will visit & work with us to create a résumé
      2. JavaScript - Exam
    2. Lab Assignment -
      1. JavaScript exam
      2. Extra Practice: Problem 5

    33
      Monday - Vocabulary & Advanced CSS & HTML DOM
    1. Classroom Discussion -
      1. Vocabulary Discussion
      2. CSS Dimension properties allow control of the height and width of an element and the space between two lines
      3. HTML DOM is a programming interface for HTML documents and defines how you can access and change the content of HTML documents. DOM stands for the Document Object Model
      4. DOM Objects can have properties with values and can respond to events and may be used in functions() to change styles
      5. DOM Levels are separated into three parts: Core, XML, and HTML
      6. DOM Event Objects represents the state of an event, such as the element in which the event occurred, the state of the keyboard keys, the location of the mouse, and the state of the mouse buttons. The event object is available only during an event - that is, you can use it in event handlers but not in other code.
      7. DOM Body Object represents the body of the document
      8. DOM Anchor Objects An anchor can be used in two ways: 1) To create a link to another document by using the href attribute or 2) To create a bookmark inside a document, by using the name attribute. All Anchor objects in a document can be found in the Document object's anchors array
      9. DOM Image Objects represent an HTML img element
    2. Lab Assignment -
      1. On-screen practice with JavaScript DOM
      2. Practice with JavaScript HTML Document Object Modules. Use events, body, anchor, and image:
        1. Create a web page called "H:/JavaScript/dom/dom.htm"
        2. Write code so that the user can change the background color by clicking
        3. Write code so that the user can't click on a link to "whitehouse.com"
        4. Write code so that the user can cycle through a series of 5 pictures by clicking on the picture
        5. Test frequently
        6. Make it work
        7. Make it look good

    34
      Tuesday - PDP & Advanced CSS & HTML DOM
    1. Classroom Discussion -
      1. Professional Development - Level 2.5 – Team Skills and Group Projects
      2. CSS Classification properties control how to display an element, set where an image will appear in another element, position an element relative to its normal position, position an element using an absolute value, and the visibility of an element
      3. DOM Form Objects are used to prompt users for input. We may use form elements such as text fields, radio buttons, checkboxes and selection lists. The input data is normally posted to a server for processing. Most DOM objects are stored in a form elements array. You can access a the element by indexing this array - either by number (0 represents the first element in a form) or by using the value of the name attribute
        1. DOM Button Objects
        2. DOM Text Objects
        3. DOM Password Objects
        4. DOM Textarea Objects
        5. DOM Ratio Objects
        6. DOM Checkbox Objects
        7. DOM Select Objects
        8. DOM Option Objects
      4. Lab Assignment -
        1. On-screen practice with JavaScript DOM

    35
      Wednesday - Math & Advanced CSS & HTML DOM
    1. Classroom Discussion - Mr. Clarke absent, substitute teacher
      1. Ms. DiPierro will visit and review math concepts for HSPA
    2. Lab Assignment -
      1. Math worksheet with Ms. DiPierro (AM class only)
      2. Practice with JavaScript HTML Document Object Modules. Use forms and form objects:
        1. Create a web page called "H:/JavaScript/dom/user.htm"
        2. Add a textbox for user e-mail and validate it (example)
        3. Add a textbox for userid and validate that it's exactly 8 characters (example)
        4. Add a textbox for password and validate that it's exactly 8 characters (example)
        5. Add three textboxs for telephone number area code-city-exchange and jump from each when they're the properly filled out (3-3-4) (example)
        6. Use radio buttons to ask the user if they want to receive e-mails (yes/no) (example)
        7. Use check boxes to ask the user what type of e-mails they want to receive (updates/warnings/advertisements) (example)
        8. Use an confirm pop-up message to allow the user to confirm their selections, except password (example)
        9. Display all the user selections in a textarea box (example)
        10. Do your best!!!
        11. Test frequently
        12. Make it work
        13. Make it look good
      3. Complete the "dom.htm" assignment from Monday
      4. EXTRA CREDIT A Cool Million - How long to get to $1,000,000? Read the article Want to Be a Millionaire? and create an Excel spreadsheet to figure out how you can get to $1 million. If you deposit an amount of money regularly, and let the interest compound without taking any withdrawals, your money will eventually start a tremendous growth. Place labels to identify numbers on your spreadsheet. Rows will be years of savings. Columns will be types of savings and Annual Percentage Rate (APR). Create a function and copy it to see how money grows:
        1. Create a new Excel spreadsheet called "coolMillion.xls" and save it to your "other assignments" folder
        2. Create a heading area with labels:
          • In cell "A1" type "Initial Amount"
          • In cell "B1" type "Monthly Deposit"
        3. Format cells "A2" and "B2" as currency
        4. Put a dollar (1) in each ("A2" and "B2")
        5. Type the label "APR" in cell "B3"
        6. Type the label "Years" in cell "A5"
        7. In cells "A6" through "A19" type the number of years as "1", "2", "3", "4", "5", "10", "15", "20", "25", "30", "35", "40", "45", & "50"
        8. In cells "B4" through "L4" type the savings types as "Savings", "CD 1 yr", "CD 3 yr", "CD 5 yr", "Treasury", "Govt Bond", "Stocks", "Ford", "McDonald's", "Coca-Cola", & "Wal-Mart"
        9. Get current MON-OC Credit Union saving interest rates. I found these: "0.35%", "2.21%", "3.27%", "4.59%", "3.80%", "5.30%", "11.00%", "15.00%", "18.00%", "21.00%", & "31.00%"
        10. Create a function in cell "B5":
          =FV(B$5/12,$A6*12,-$B$2,-$A$2)
          
          The "$" is an "absolute" cell reference, no "$" is a "relative" reference
        11. Copy the formula from "B5" to "B6" through "B19"
        12. Copy the formula from "B5" through "B19" to "C5" through "L5"
        13. Highlight and format all columns for "AutoFit" so you can see the results
        14. Does yours match mine?
        15. Make it look good
        16. Put your name on the top
        17. Print and hand in
        18. Try saving $2 per month, or even $5, how fast to earn $1 million?
        19. How much would your money be worth without any interest? Create a column to track this
      5. Work on unfinished labs

    36
      Thursday - Science & Advanced CSS & HTML DOM
    1. Classroom Discussion -
      1. Science - How Blu-ray Discs Work
      2. CSS Positioning properties define the position of an element
      3. DOM Table Objects
      4. DOM TableHeader Objects
      5. DOM TableRow Objects
      6. DOM TableData Objects
    2. Lab Assignment -
      1. On-screen practice with JavaScript DOM
      2. Create a JavaScript HTML DOM page with a smiley face, when the user moves the mouse over the smiley face, the smiley face moves to a random position on the page. Call this "smiley.htm" and save it to your "H:/JavaScript/DOM" folder

    37
      Friday - English & Advanced CSS & HTML DOM
    1. Classroom Discussion -
      1. English - Good résumé vs bad résumé
      2. Vocabulary Tutor Program
      3. CSS Pseudo-classes are used to add different effects to some selectors, or to a part of some selectors
      4. CSS Pseudo-elements are used to add different effects to some selectors, or to a part of some selectors
      5. DOM Frame Objects
      6. DOM Frameset Objects
      7. DOM Iframe Objects
    2. Lab Assignment -
      1. On-screen practice with JavaScript DOM

    01/17/05
    Monday - No School - Dr. Martin Luther King Day Holiday
    01/18/05
    Tuesday - No School - Teacher In-Service
    38
      Wednesday - Math & Advanced CSS & HTML DOM & References for Friday
    1. Classroom Discussion -
      1. Math - Credit Cards from practicalMoneySkills.com
      2. PM class bad résumé worksheet
      3. Financial Aid Workshop, for Seniors planning to go on to colleges next fall, in Mr. Clarke's classroom
      4. Internet Searching practice, in Mr. George's lab
      5. Schools' Mid-Term Schedules

    39
      Thursday - Science & Advanced CSS & HTML DOM & References for Friday
    1. Classroom Discussion -
      1. Science - How Semiconductors Work from howStuffWorks.com
      2. More Science - from the Consumer Electronics Show 2005 in Las Vegas and howStuffWorks.com
      3. DOM Window Object corresponds to the browser window. A Window object is created automatically with every instance of a <body> or <frameset> tag
      4. DOM Navigator Object contains information about the client browser
      5. DOM Document Object is used to access all elements in a page
      6. DOM Location Object contains information about the current URL
      7. DOM History Object consists of an array of URLs. These URLs are the URLs the user has visited within a browser window
      8. Schools' Mid-Term Schedules
    2. Lab Assignment -
      1. On-screen practice with JavaScript DOM
      2. Finish off the labs from 01/10/05 & 01/12/05

    40
      Friday - English & Advanced CSS & HTML DOM
    1. Classroom Discussion -
      1. English - more résumé and references with Ms. Russen
      2. Review of HTML DOM & JavaScript
      3. Schools' Mid-Term Schedules
    2. Lab Assignment -
      1. English résumé worksheet
      2. Finish off the labs from 01/10/05 & 01/12/05

    41
      MONDAY - SNOW EMERGENCY - OCVTS CLOSED
    News - Barret Wins $250 in OCVTEA Teacher's Union Logo Design Contest

    42
      Tuesday - End of Marking Period Project
    1. Lab Assignment -
      1. End of Marking Period Project - Create a web page to convert temperatures from Fahrenheit to Celcius or from Celcius to Fahrenheit:
        1. What's a good name?
        2. Do you need user input? How will you get it?
        3. How will the user tell you to proceed? What type of event should you expect?
        4. What processes or functions will you use?
        5. How will you display your result to the user?
        6. Use CSS and JavaScript and DOM
        7. Test frequently
        8. Make it work
        9. Make it look good

    43
      Wednesday - English & End of Marking Period Project
    1. Classroom Discussion -
      1. English - Ms. DiPierro will diss HSPA techniques
    1. Lab Assignment -
      1. End of Marking Period Project - Create a web page to convert distances:
        1. What's a good name?
        2. Begin with conversions between miles and kilometers, between feet and meters, between inches and centimeters
        3. Do you need user input? How will you get it?
        4. How will you let the user decide which conversion to make? Buttons? Radio buttons? Checkboxes? How about a drop-down select menu?
        5. How will the user tell you to proceed? What type of event should you expect?
        6. What processes or functions will you use?
        7. How will you display your result to the user?
        8. Use CSS and JavaScript and DOM
        9. Test frequently
        10. Make it work
        11. Make it look good

    44
      Thursday - End of Marking Period Project
    1. End of Marking Period Project - Create a web page to convert Roman numerials:
      1. What's a good name?
      2. Do you need user input? How will you get it?
      3. How will you let the user decide which conversion to make?
      4. How will the user tell you to proceed? What type of event should you expect?
      5. What processes or functions will you use?
      6. How will you display your result to the user?
      7. Use CSS and JavaScript and DOM
      8. Test frequently
      9. Make it work
      10. Make it look good
      11. Some considerations:
        M=1000MC=1100CM=900
        D=500DC=600CD=400
        C=100CX=110XC=90
        L=50LX=60XL=40
        X=10XI=11IX=9
        V=5VI=6IV=4

    45
      Friday - End of Marking Period Project
    1. Lab Assignment -
      1. Class evaluation of End of Marking Period Projects