Marking Period 3

Click for Instructions
Click on the date to open the details.
Click date again to close the details.
Day Date   Discussion
1 01/30/06 Monday - English, "vbCypher4", "vbBinary"
  1. Classroom Discussion -
    1. English - the College Résumé
    2. Visual Basic review
  2. Lab Assignment -
    1. English résumé worksheet
    2. Complete our VB program "vbCypher4" using the matrix math Ms. Verde taught us Friday
      1. Using the formula we developed with Ms. Verde to produce an encoded message: n1 * m1 + n2 * m2 , n1 * m3 + n2 * n4 ,
      2. Open "vbCypher4"
      3. Add variables:
        • "intMatrix(4)" to hold the matrix used to produce the code
        • "intComma" to hold the position of the next comma in the input matrix
        • "intCode(2)" to hold a pair of code numbers
      4. Place code for instructions e to h at the top of the Encode event
      5. Clear the output Text Object
      6. Set the variable "intComma" to zero
      7. Set the variable "intLength" to zero
      8. The matrix will always have four integer numbers, but may be negative or double digit, so we need a short loop to get all four numbers:
        • Loop from 1 to 4
        • Determine the length of the number using the "InStr()" function to find the position of the next comma starting at the current comma + 1
        • Load "intMatrix(sentinel)" with the middle of the input string starting at "intComma + 1" ending at "intLength - intComma - 1"
        • Set the next "intComma" as the current "intLength"
      9. If the input is an odd number of characters, make it even (you already have this)
      10. Get pairs of numbers from uppercase letters (you already have this)
      11. Add a call to a routine "doEncode()" to the "Case 2:" code segment
      12. Write the "doEncode()" routine using Ms. Verde's matrix math code sequence:
        • n1 * m1 + n2 * m2
        • Add a comma as a delimiter
        • n1 * m3 + n2 * n4
        • Add a comma as a delimiter
      13. Save & Test using the message "Happy Birthday" - if it works correctly, you will get the same coded message you got on Friday
    3. Create a VB program "vbBinary" to convert decimal numbers to binary numbers & back

2 01/31/06 Tuesday - Vocabulary, "vbRoman"
  1. Classroom Discussion -
    1. Computer Vocabulary - a daily investigation
    2. Visual Basic review
  2. Lab Assignment -
    1. Vocabulary worksheet
    2. Create a VB program "vbRoman" to convert decimal numbers to Roman numbers & back

3 02/01/06 Wednesday - Career, "vbDice"
  1. Classroom Discussion -
    1. Part II of résumé tutorial from quintcareers.com
    2. Visual Basic review
  2. Lab Assignment -
    1. Résumé worksheet
    2. Create a VB program "vbDice" to simulate rolling dice

4 02/02/06 Thursday - Science, "vbLineBall"
  1. Classroom Discussion -
    1. Science - How Voice Over Internet Protocol works - from HowStuffWorks.com
    2. Visual Basic review
  2. Lab Assignment -
    1. Science worksheet
    2. Create a VB program "vbLineBall", a game with a bouncing ball in a dimishing space

5 02/03/06 Friday - SkillsUSA, "vbConclusion"
  1. Classroom Discussion -
    1. SkillsUSA home page - Contest Updates:
    2. SkillsUSA - Level 1-2, something, something, something
    3. Visual Basic review
  2. Lab Assignment -
    1. PDP Blue Book worksheet
    2. Create a VB program "vbConclusion", next week we're on to C++
02/04/06 Saturday - SkillsUSA Open House at the Brick Vocational Center - Click for more information
  • Voluntary
  • 9:00 a.m. to 1:00 p.m.
  • Demonstrations of what we're learning & doing
  • Web sites & PC programming
  • Games & Prizes
  • Fun for all ages
  • Extra-credit available
  • Not interested? Stop by & see what other students in other classes in the school district are doing

6 02/06/06 Monday - Morning Announcements (any volunteers?) - SkillsUSA, C++ Intro, "cppHelloWorld"
  1. Classroom Discussion -
    1. Skills USA -
    2. Some websites with good info on C++:
    3. C++ Lessons for Today:
  2. Lab Assignment -
    1. SkillsUSA PDP Blue Book lesson
    2. Familiarize with the Microsoft Visual C++ Integrated Development Environment
    3. Create a folder for C++
    4. Steps to create a C++ console program:
      1. Open C++
      2. File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
      3. File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
      4. Add code to the source window
      5. Compile -- Build, Compile
      6. Link -- Build, Build
      7. Run -- Build, Execute
      8. Compile, Link, Run -- one step -- click the exlamation point button
    5. Create a C++ program "cHelloWorld"
    6. Work on your Computer Science PowerPoint presentation

7 02/07/06 Tuesday - Morning Announcements (any volunteers?) - Technology Vocabulary, C++ Input/Output, "cppTemperature1"
  1. Classroom Discussion -
    1. Technology Vocabulary - a daily experience
    2. C++ Lessons for Today:
  2. Lab Assignment -
    1. Technology Vocabulary - a daily experience
    2. Review -- Steps to create a C++ console program:
      1. Open C++
      2. File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
      3. File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
      4. Add code to the source window
      5. Compile -- Build, Compile
      6. Link -- Build, Build
      7. Run -- Build, Execute
      8. Compile, Link, Run -- one step -- click the exlamation point button
    3. Create a C++ program "cppVariableDemo"
    4. Create a C++ program "cppTemperaturer" - convert 86 Fahrenheit to Centigrade
    5. Work on your Computer Science PowerPoint presentation

8 02/08/06 Wednesday - Morning Announcements (any volunteers?) - Career, C++ Decisions 1, "cppGrades"
  1. Classroom Discussion -
    1. Résumé review & practice
    2. C++ - about.com - Decisions 1 - If
  2. Lab Assignment -
    1. Review & update your résumé
    2. Review -- Steps to create a C++ console program:
      1. Open C++
      2. File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
      3. File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
      4. Add code to the source window
      5. Compile -- Build, Compile
      6. Link -- Build, Build
      7. Run -- Build, Execute
      8. Compile, Link, Run -- one step -- click the exlamation point button
    3. Create a C++ program "cppGrades" - get
    4. fahrenheit temperature, display centigrade temperature
    5. Work on your Computer Science PowerPoint presentation

9 02/09/06 Thursday - Morning Announcements (any volunteers?) - Science, C++ Decisions 2, "cppSalary"
  1. Classroom Discussion -
    1. Science - How Keyboards work - from HowStuffWorks.com
    2. Keyboard Safety & ergonomics
    3. DataHand ergonomic keyboards for sale
    4. SafeType ergonomic keyboards for sale
    5. C++ - about.com - Decisions 2 - Switch Case
  2. Lab Assignment -
    1. Review -- Steps to create a C++ console program:
      1. Open C++
      2. File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
      3. File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
      4. Add code to the source window
      5. Compile -- Build, Compile
      6. Link -- Build, Build
      7. Run -- Build, Execute
      8. Compile, Link, Run -- one step -- click the exlamation point button
    2. Create a C++ program "cppSalary" - get hours worked & pay rate, display weekly salary
    3. Work on your Computer Science PowerPoint presentation

02/09/06 Thursday - Open House at the Toms River Vocational Center - Click for more information
  • Voluntary
  • 7:00 p.m. to 9:00 p.m.
  • Demonstrations of what we're learning & doing
  • Web sites & PC programming
  • Games & Prizes
  • Fun for all ages
  • Extra-credit available
  • Not interested? Stop by & see what other students in other classes in Toms River are doing
10 02/10/06 Friday - Morning Announcements (any volunteers?) - Math, C++ quiz, C++ Loops, "cppRoomArea", "cppStars"
  1. Classroom Discussion -
    1. Math - matrix inversions & decoding with Ms. Verde
    2. C++ - about.com - Loops - While, Do Whlie, For
  2. Lab Assignment -
    1. Math worksheet
    2. Review -- Steps to create a C++ console program:
      1. Open C++
      2. File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
      3. File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
      4. Add code to the source window
      5. Compile -- Build, Compile
      6. Link -- Build, Build
      7. Run -- Build, Execute
      8. Compile, Link, Run -- one step -- click the exlamation point button
    3. QUIZ - Take the C++ 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
    4. QUIZ - Create a C++ program "cppRoomArea" - get width length of room, display area of room
    5. Work on your Computer Science PowerPoint presentation

11 02/13/06 90 Minute Delayed Opening - due to snow - OCVTS Home Page
Monday - English, C++ Pointers, "cppPointerDemo", "cpp99Bottles"
  1. Classroom Discussion -
    1. English - Ms. Gerrick will visit & review your résumés
    2. C++ - about.com - Intro to Pointers
  2. Lab Assignment -
    1. Create a C++ program "cppPointerDemo" - practice with pointers
    2. Create a C++ program "cpp9Bottles" - display the world-famous song on screen, starting with a number the user chooses, ending with a number the user chooses
    3. Work on your Computer Science PowerPoint presentation

12 02/14/06 Tuesday - Microsoft Word practice labs
  1. Classroom Discussion -
      Mr Clarke out sick with snow-related back injury
  2. Lab Assignment -
    1. 3-part lab practice using Microsoft Word
    2. Work on your Computer Science PowerPoint presentation

13 02/15/06 Wednesday - Visual Basic practice labs
  1. Classroom Discussion -
      Mr Clarke out sick with snow-related back injury - I might be online - MSMessenger "Mahire's Husband" or AOLIM "CompSciClarke" - Have a Great Day!
  2. Lab Assignment - 3 Programming Assignments to Practice Visual Basic Programming
    1. Multi-Dice - Create a Visual Basic program "css50vbMultiDice" to simulate rolling multiple dice of different sizes:
      1. Allow the user to choose how many dice, minimum 1, maximum 5, you may use radio buttons instead of a text box
      2. Allow the user to choose how many sides on each dice, minimum 2, maximum 12, you may use a scroll bar instead of a text box
      3. Use a command button to go
      4. Use a picture box for output
      5. Clear the output picture box
      6. Don't forget "Randomize"
      7. Loop for how many dice, you may use a while loop or a for loop
      8. Display a pseudo-random number onto a picture box
      9. Keep track of totals
      10. Display total numbers rolled after the loop ends
      11. Save on your "H:/vb" drive
    2. How Many Days - Create a Visual Basic program "css50vbHowManyDays" to calculate how many days have expired since a certain date or how many days until a certain date:
      1. Visual Basic allows for subtraction of dates & will return the number of days that separate them
      2. Allow the user to input a date
      3. Use a command button to go
      4. Create two date variables "dteInput" & "dteToday"
      5. Create an integer variable "intDiff"
      6. Clear your output
      7. If your input is not blank
      8. If yout input "isDate()"
      9. Assign the return from the Visual Basic built-in routine "Now()" to "dteToday"
      10. Use "CDate()" to convert the input to a date data type & assign to "dteInput"
      11. Determine whether to subtract today from input or input from today using an "If" statement
      12. Subtract the first from the second & display appropriate output
      13. Otherwise subtract the second from the first & display appropriate output
      14. Test with "1/1/01" (45 days ago) & "6/15/06" (120 days from today)
      15. Save on your "H:/vb" drive
    3. Discount Value - Create a Visual Basic program "css50vbDiscount" to determine a discount value given a discount percentage or vice versa:
      1. Discounts in a store are given in percentages or in dollar amounts off a starting price
      2. Create a form to accept a starting price & 1) a discount percentage or 2) a dollar amount off
      3. If discount percentage, display the dollar amount off & final price
      4. If dollar amount off, display the discount percentage & final amount
      5. Save on your "H:/vb" drive
    4. Roman Numbers - Create a Visual Basic program to convert a decimal number to Roman numbers or vice versa:
      1. (AM class has started this already
      2. Research how Roman numbers work on the internet:
        • I = 1
        • V = 5
        • X = 10
        • L = 50
        • C = 100
        • D = 500
        • M = 1000
        • Don't go any higher
      3. Input is either a decimal number or Roman number symbols
      4. By decimal, I mean a base 10 integer number not contain a fractional amount
      5. Allow the user or the program to determine the conversion
      6. Decimal to Roman conversion works similar to calculating change: use modulus then integer division
      7. Roman to Decimal conversion requires converting alpha letters to numbers in sequence, sometimes you convert left to right, sometimes you must look at the next letter & convert a pair of alpha to one number:
        • VI = 5 + 1 = 6
        • IV = 1 before 5 = 4
        • XI = 10 + 1
        • IX = 1 before 10 = 9
        • LX = 50 + 10 = 60
        • XL = 10 before 50 = 40
        • CX = 100 + 10 = 110
        • XC = 10 before 100 = 90
        • DC = 500 + 100 = 600
        • CD = 100 before 500 = 400
        • MC = 1000 + 100 = 1100
        • CM = 100 before 1000 = 900
      8. It gets complicated -- test frequently
      9. Test using easily converted numbers:
        • Some of the numbers exampled above
        • MMVI = 2006
        • MCMXCIV = 1994
        • MCMDXXXVI = 1986
      10. Save on your "H:/vb" drive
    5. Binary - Create a Visual Basic program to convert a decimal number to Binary numbers or vice versa:
      1. Decimal to Binary is easy: use modulus & integer division
      2. Binary to Decimal requires keeping track of the position of the binary number, multipling by the power of 2 & totalling:
        • 0011 = 0(8) + 0(4) + 1(2) + 1(1) = 3
        • 1001 = 1(8) + 0(4) + 0(2) + 1(1) = 9
        • 1010 = 1(8) + 0(4) + 1(2) + 0(1) = 10
        • 1100 = 1(8) + 1(4) + 0(2) + 0(1) = 13
      3. Save on your "H:/vb" drive
    6. Number Puzzle - Create a Visual Basic program to play the game:
      1. Just do it!
      2. Click on a number to move it to the blank space
      3. Arrange the numbers in sequence from top left to bottom right
      4. Save on your "H:/vb" drive
    7. Work on your Computer Science PowerPoint presentation

14 02/16/06 Thursday -
  1. Classroom Discussion -
    1. Science - How Mice work
    2. ergmouse
    3. alt-mice
    4. ergonomic mice
    5. C++ - about.com - Intro to Pointers
  2. Lab Assignment -
    1. Work on your Computer Science PowerPoint presentation

02/17/06 Friday - Presidents' Weekend - No School
02/20/06 Monday - Presidents' Weekend - No School
15 02/21/06 Tuesday - C++ Practice, "cppLoopStars", "cppGPA"
  1. Classroom Discussion -
    1. C++ - about.com - Review
    2. C++ text file input/output:
      #include <iostream>
      #include <fstream>
      #include <string>
      
      ifstream iFile(inFileName);
      ofstream oFile(outFileName,ios::app);
      
      if (! iFile)
      {
      	cout << "Error opening input file" << endl;
      	return -1;
      }
      else
      	cout << "File opened successfully" << endl;
      if (! oFile)
      {
      	cout << "Error opening output file" << endl;
      	return -1;
      }
      
      iFile.get(ch);
      oFile.put(ch);
      
      i = 0;
      while((ch=inFile.peek()) != EOF)
      {
      	inFile >> words[i];
      	i++;
      }
      
    3. cPlusPlus.com - tutorial
    4. binary file I/O - tutorial
  2. Lab Assignment -
    1. Create a C++ program "cppLoopStars" - practice with decisions & loops
    2. Create a C++ program "cppGPA" - practice with NJIT Contest sample problems
    3. Work on your Computer Science PowerPoint presentation

16 02/22/06 Wendesday - C++ Practice, "cppTicTacToe", "cppPrime"
  1. Classroom Discussion -
    1. C++ - about.com - Review
  2. Lab Assignment -
    1. Create a C++ program "cppTicTacToe" - practice with decisions & loops
    2. Create a C++ program "cppPrime" - practice with NJIT Contest sample problems
    3. Work on your Computer Science PowerPoint presentation

17 02/23/06 Thursday - C++ Practice, "cppTowerOfHanoi", "cppTemperature"
  1. Classroom Discussion -
    1. C++ - about.com - Review
  2. Lab Assignment -
    1. Create a C++ program "cppTowerOfHanoi" - practice with decisions & loops
    2. Create a C++ program "cppTemperature" - practice with NJIT Contest sample problems
    3. Work on your Computer Science PowerPoint presentation

18 02/24/06 Friday - SkillsUSA, C++ Practice, "cppHangMan", "cppSquareRoots", "cppBinary"
  1. Classroom Discussion -
    1. SkillsUSA home page - Contest Updates:
    2. C++ - about.com - Review
  2. Lab Assignment -
    1. Create a C++ program "cppHangMan" - practice with decisions & loops
    2. Create a C++ program "cppSquareRoots" - practice with NJIT Contest sample problems
    3. Create a C++ program "cppBinary" - practice with NJIT Contest sample problems
    4. Work on your Computer Science PowerPoint presentation

19 02/27/06 Monday - English, C++ Pointers, "cpp99Bottles"
  1. Classroom Discussion -
    1. Ms. Gerick will visit & review your résumés
    2. C++ - about.com - Chapter 8 - Introduction to Pointers
  2. Lab Assignment -
    1. I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
    2. Create a C++ program "cppPointerDemo" - practice with pointers
    3. Create a C++ program "cpp99Bottles" - recreate the world-famous song in text using C++ pointers:
      • As the user how many
      • Create howMany instances of an integer number using pointers
      • Sing the song using the integer numbers & pointers
      • Pause between verses
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to the Q: drive & your H: drive
    4. Work on your Computer Science PowerPoint presentation

20 02/28/06 Tuesday - Vocabulary, C++ Classes, "cppStudents"
  1. Classroom Discussion -
    1. Techology Vocabulary - a daily convention
    2. C++ - about.com - Chapter 9 - Introduction to Classes
  2. Lab Assignment -
    1. I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
    2. Create a C++ program "cppClassDemo" - practice with classes
    3. Create a C++ program "cppStudents" - create a class "students" to hold an ID number, first & last name, & age:
      • Create the class
      • Create & populate 5 instances of the class
      • Display the 5 to the user
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to the Q: drive & your H: drive
    4. Work on your Computer Science PowerPoint presentation

21 03/01/06 Wednesday - Career, C++ Arrays & Vectors, "cppGrades2"
  1. Classroom Discussion -
    1. Online
    2. C++ - about.com - Chapter 10 - Arrays & Vectors
  2. Lab Assignment -
    1. I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
    2. Create a C++ program "cppArrayDemo" - practice with arrays
    3. Create a C++ program "cppGrades2" - Modify your existing "cppGrades" program using arrays to keep track of all grades & credits in an array & display all grades & credits back to the user after the user has finished entering data:
      • Ask the user how many classes
      • Declare array variables for className, letterGrade, credits
      • Read from the keyboard & populate all array variables
      • Calculate numberGrade based on (A=4, B=3, C=2, D=1, F=0)
      • Calculate creditPoints & keep track of totalCreditPoints
      • Keep track of totalCredits
      • When all classes have been entered, display all data back to user
      • Calculate GPA as totalCreditPoints / totalCredits
      • Display GPA
      • Explain all numbers to the user (Remember: users are !!!!!!)
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to the Q: drive & your H: drive
    4. Work on your Computer Science PowerPoint presentation

22 03/02/06 Thursday - Science, C++ Strings, "cppMadLibs"
  1. Classroom Discussion -
    1. Science - How Laser Printers work
    2. Science - How Inkjet Printers work
    3. C++ - about.com - Chapter 11 - Strings
    4. Vocabulary words to remember:
      class
      object
      encapsulate
      instance
      instanciate
      private vs. public
      member
      method vs. function
      accessor
      declare vs. define
      scope
      constructor vs. destructor
      dynamically allocated memory
      method overloading
      inheritance
      polymorphism
    5. Things to look for in todays lesson:
      • Is "string" actually an array of individual "char" elements?
      • How can you access the individual "char" elements of a "string" class variable?
      • Is string a class?
      • Does the string class have member variables?
      • What are some of the member variables?
      • Are they "private" or "public"?
      • Does the string class have method functions?
      • How does the member function "size()" work?
      • How does the member function "empty()" work?
      • How does the member function "find()" work?
      • What arguments does "find()" require?
      • How would you use "find()" to search a "string" array for a particular "char"?
      • How do you concatenate two string variables together?
  2. Lab Assignment -
    1. I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
    2. Create a C++ program "cppStringDemo" - practice with strings
    3. Create a C++ program "cppMadLibs" - play the game:
      • Read a set of 5 individual words from the keyboard
      • When complete, display a paragraph to the user using the words plus some phrases you've inserted
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to the Q: drive & your H: drive
    4. Work on your Computer Science PowerPoint presentation

23 03/03/06 Friday - SkillsUSA, C++ Quiz = "cppHangMan"
  1. Classroom Discussion -
    1. SkillsUSA home page - Contest Updates:
    2. PDP - Level 1-2, Goals & Motivation
    3. C++ Review
  2. Lab Assignment -
    1. I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
    2. QUIZ - Create a C++ program "cppHangMan" - play the game:
      • The input text file has one word on each line
      • Read a list of 10 words from a text file
      • Choose one of the words at random
      • Determine how many letters are in the word
      • Show the user how many letters there are using exclamation "!" points
      • Show the user all letters not yet guessed
      • Read a user guess
      • Determine if the guess is one of the letters
      • Redraw the exclamation word replacing correct letters
      • Remove the guess letter from the letters not yet guessed & redraw
      • For incorrect guesses, add to the scaffold
      • Allow for 10 incorrect guesses, then declare loser
      • If all letters correct (no more exclamations) declare winner
      • Allow the user to play again at game end (win or lose)
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to the Q: drive & your H: drive
      Some references:
      • C++ - about.com - Chapter 12 - Text File Input/Output
      • File input, one of multiple ways to read data in from a text file, this reads one string from each line of input text:
        #include <fstream>
        ifstream inFile("words.txt");
        string words[10];
        if(inFile.is_open()) {
        	while(!inFile.eof()) {
        		getline(inFile,words[i]);
        		cout << words[i++] << endl;
        	}
        }
        
      • C++ - about.com - Topics in C++ - Random Numbers
      • Random number generation, one of the multiple ways, this uses time to randomize the number string & highNum to control the range:
        #include <cstdlib>
        #include <ctime>
        int highNum = 10;
        int ranNum=0;
        srand( (unsigned)time( NULL ) );
        for(i=1;i<=50;i++) {
        	ranNum = (int)highNum * rand() / (RAND_MAX + 1.0);
        	cout << ranNum << endl;
        }
        

24 03/06/06 Monday - SkillsUSA, C++ Practice, "cppHangMan", "cppPalindrome"
  1. Classroom Discussion -
    1. SkillsUSA home page - Contest Updates:
    2. PDP - Level 1-2, Goals & Motivation
    3. C++ Practice
  2. Lab Assignment -
    1. PDP - Complete Level 1-2, Goals & Motivation
    2. Complete the C++ program "cppHangMan" from Friday
    3. Create a C++ program "cppPalindrome" to determine if a sentence or phrase input is a true palindrome:
      • Just what is a palindrome?
      • Create a new project "Win32 Console Operation" & new file "C++ Console Application"
      • Read a word or phrase from the keyboard into a string variable
      • Reverse the phrase into a second string variable
      • If they are identical then you have a true palindrome phrase, tell the user
      • If they don't match, report that to the user
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive

25 03/07/06 Tuesday - Vocabulary, C++ Practice, "cppTicTacToe"
  1. Classroom Discussion -
    1. Techology Vocabulary - a daily supposition
    2. C++ Practice
  2. Lab Assignment -
    1. Create a C++ program "cppTicTacToe" to play the game:
      • Just what is a Tic Tac Toe game?
      • Create a new project "Win32 Console Operation" & new file "C++ Console Application"
      • Use ASCII Art to draw a blank game board
      • Ask user X which square
      • Redraw the game board placing an "X" in the proper square
      • Repeat as neccessary
      • Determine a winner by three in a row horizontally, vertically, or diagonally
      • Determine a tie game by no blanks left
      • Keep track of how many wins
      • Have a command to Reset the game board
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive

26 03/08/06 Wednesday - Career, C++ Practice, "cppTowersOfHanoi"
  1. Classroom Discussion -
    1. Career Review - What do we know so far?
    2. C++ Practice
  2. Lab Assignment -
    1. Create a C++ program "cppTowersOfHanoi" to play the game:
      • Just what is the Towers of Hanoi game?
      • Three towers & 5 disks of different sizes each with a hole in the center
      • To start, the 5 disks are stacked on the center tower with the largest disk on the bottom & the smallest on the top
      • Disks are moved one-at-a-time from one tower to another
      • The object is to move all the disks to one of the other towers
      • Create a new project "Win32 Console Operation" & new file "C++ Console Application"
      • Draw the initial game board with towers & disks
      • A legal move is a disk to a tower with no disk or a smaller disk onto a larger disk
      • An illegal move is when a larger disk covers a smaller disk
      • Get from the user which tower to move from & which tower to move to
      • If the move is legal, move the disk & redraw the game board
      • If the move is illegal, tell the user so & redraw the game board without moving the disk
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive

27 03/09/06 Thursday - Science, C++ Practice, "cppRoman"
  1. Classroom Discussion -
    1. Coordinated class with Health & Fitness (9:30 & 12:30)
    2. Roman Numbers
  2. Lab Assignment -
    1. Create a C++ program "cppRoman" to convert Arabic to Roman & Roman to Arabic:
      • Visit Roman Numbers to learn
      • Ask the user whether [R]oman to Arabic or [A]rabic to Roman
      • Get the answer
      • For [R]oman to Arabic, ask the user to input a string variable representing the Roman number
      • For [A]rabic to Roman, ask the user to input an integer variable representing the Arabic number
      • Convert & display
      • Repeat until the user chooses to [Q]uit
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive

28 03/10/06 Friday - Math, C++ Practice, "cppBinary"
  1. Classroom Discussion -
    1. Ms. Verde will visit & discuss binary numbers
    2. Binary Numbers
  2. Lab Assignment -
    1. Create a C++ program "cppBinary" to convert numbers from Decimal to Binary & from Binary to Decimal:
      • Visit Binary Numbers to learn
      • Ask the user whether [B]inary to Decimal or [D]ecimal to Binary
      • Get the answer
      • For [B]inary to Decimal, ask the user to input a string variable representing the Binary number
      • For [D]ecimal to Binary, ask the user to input an integer variable representing the Decimal number
      • Convert & display
      • Repeat until the user chooses to [Q]uit
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive

29 03/13/06 Monday - English, C++ File Input/Output, "cppMailingList"
  1. Classroom Discussion -
    1. Ms. Gerick will visit & discuss Help Wanted Advertisements & Job Applications
    2. C++ - about.com - Chapter 12 - File Input/Output
  2. Lab Assignment -
    1. English worksheets
    2. Create a C++ program "cppMailingList" to keep track of a mailing list of user names/addresses in a file:
      • Create a text file "mailing.txt"
      • Open the file for input
      • Read all data into array variables
      • Close the input file
      • Read the user name from the keyboard
      • Check the user name with all names
      • If match, display user name, street, city
      • If no match:
        • Read user street & city from the keyboard
        • If no match, open file for append
        • If no match, add name, street, city to file
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive

30 03/14/06 Tuesday - Vocabulary, C++ References, "cppHexConverter", "cppOctalConverter", "cppCircle"
  1. Classroom Discussion -
    1. Techology Vocabulary - a daily wonderment
    2. C++ - about.com - Chapter 13 - References (just read)
    3. Behave!!!
  2. Lab Assignment -
    1. Create a C++ program "cppHexConverter" to convert numbers from Decimal (base 10) to Hexadecimal (base 16) & from Hexadecimal to Decimal:
      • Visit Hexadecimal Numbers to learn
      • Ask the user whether [H]exadecimal to Decimal or [D]ecimal to Hexadecimal
      • Get the answer
      • For [H]exadecimal to Decimal, ask the user to input a string variable representing the Hexadecimal number between 00 & FF
      • For [D]ecimal to Hexadecimal, ask the user to input an integer variable representing the Decimal number between 0 & 255
      • Convert & display
      • Repeat until the user chooses to [Q]uit
      • Save initially to your "MyDocuments" folder
      • Test frequently - here are some sample conversions - you should get the same results:
        Hexadecimal to Decimal
        Hexadecimal NumberDecimal Number
        3321
        8A138
        FF255
        Decimal to Hexadecimal
        Decimal NumberHexadecimal Number
        1610
        12880
        210D2
      • Copy to your "H:/" drive
    2. Create a C++ program "cppOctalConverter" to convert numbers from Decimal (base 10) to Octal (base 8) & from Octal to Decimal:
      • Visit Octal Numbers to learn
      • Ask the user whether [O]ctal to Decimal or [D]ecimal to Octal
      • Get the answer
      • For [O]ctal to Decimal, ask the user to input an integer variable representing the Octal number
      • For [D]ecimal to Octal, ask the user to input an integer variable representing the Decimal number
      • Convert & display
      • Repeat until the user chooses to [Q]uit
      • Save initially to your "MyDocuments" folder
      • Test frequently - here are some sample conversions - you should get the same results:
        Octal to Decimal
        Octal NumberDecimal Number
        01212
        234156
        345229
        Decimal to Octal
        Decimal NumberOctal Number
        810
        88130
        255377
      • Copy to your "H:/" drive
    3. Create a C++ program "cppCircle" to calculate the area & circumference of a circle:
      • Visit Circle Formulas to learn
      • Ask the user for the radius
      • Get the answer
      • Calculate the area & the circumference
      • Display both answers be sure to tell the user what the numbers mean
      • Repeat until the user chooses to [Q]uit
      • Save initially to your "MyDocuments" folder
      • Test frequently - here are some sample conversions - you should get the same results:
        RadiusCircumferenceArea
        16.28243.1412
        212.564812.5648
        318.847228.2708
      • Copy to your "H:/" drive

31 03/15/06 Wednesday - Career, C++ Function Basics, "cppDistanceConverter"
  1. Classroom Discussion -
    1. Explore What Interests You? at the Bureau of Labor Statistics website
    2. C++ - about.com - Chapter 14 - Function Basics
  2. Lab Assignment -
    1. Browse website
    2. Create a C++ program "cppDistanceConverter" to convert distances Metric to US & back:
      • Visit Metric Conversion Tables to learn
      • Draw a small chart to help the user figure out what to enter:
        To Convert Use These Codes:
        From-ToEnter
        Inches to CentimetersIC
        Feet to MetersFM
        Miles to KilometersMK
        Centimeters to InchesCI
        Meters to FeetMF
        Kilometers to MilesKM
      • Ask the user to enter the convert from-to code & the distance value
      • Get the answers
      • Call a single function that will determine & calculate the correct conversion
      • Pass the code & the distance values into the function
      • Calculate the area & the circumference
      • Display enough detail to tell the user what the numbers mean
      • Repeat until the user chooses to [Q]uit
      • Save initially to your "MyDocuments" folder
      • Test frequently - here are some sample conversions - you should get the same results:
        ConversionInputResult
        Inches to Centimeters1025.4
        Feet to Meters103.05
        Miles to Kilometers1016
        Centimeters to Inches104
        Meters to Feet1033
        Kilometers to Miles106
      • Copy to your "H:/" drive

32 03/16/06 Thursday - Science, C++ Function Overloading, "cppTemperature2"
  1. Classroom Discussion -
    1. Science - How Bits & Bytes Work from howStuffWorks.com
    2. C++ - about.com - Chapter 15 - Function Overloading
  2. Lab Assignment -
    1. Create a C++ program "cppTemperature2" to use Function Overloading to convert between Fahrenheit & Celcius:
      • Write one function conv() to convert F to C, receive the temperature first & the user choice second
      • Write another function conv() to convert C to F, receive the user choice first & the temperature second
      • In the main() ask the user [F]ahrenheit or [C]elsius & get input
      • Ask the user for the temperature to be converted & get input
      • Call the function conv() with the variables in the proper position for fahrenheit or celsius
      • Repeat until the user chooses to [Q]uit
      • Save initially to your "MyDocuments" folder
      • Test frequently - here are some sample conversions - you should get the same results:
        InputResult
        F320
        F212100
        C032
        C100212
      • Copy to your "H:/" drive
    2. CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
    3. Work on your Computer Science PowerPoint presentation

33 03/17/06 Friday - SkillsUSA, C++ Quiz 2, C++ Function Templates, "cppTemperature3"
  1. Classroom Discussion -
    1. Next week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
    2. SkillsUSA home page - Contest Updates:
    3. PDP - Level 1-2, Goals & Motivation
    4. C++ - about.com - Chapter 16 - Function Templates
  2. Lab Assignment -
    1. QUIZ - Take the C++ Quiz 2. 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
    2. Create a C++ program "cppTemperature3" using Function Templates:
      • Read a list of temperatures & temperature types from an input text file named "input.txt" where the first line is an integer number that represents how many lines follow & each following line has a conversion type (F or C) & a space & a temperature number -- like this:
        10
        F 32
        F 68
        F 77
        F 86
        F 212
        C 0
        C 20
        C 25
        C 30
        C 100
        
      • Create the Windows Console Application & Source File
      • Create a text file "input.txt" & enter the sample data listed above
      • Add #include <fstream>
      • Open the text file for input
      • Read how many saved into an integer variable
      • Loop for how many
      • Read the conversion type (F or C) into a character variable
      • Read the temperature number into a float variable
      • Use a function template to set the data type for the parameter argument in the parenthesis
      • Call a function template to do the correct conversion
      • Display the original temperature & the converted temperature with explanation
      • Also write the display output to a text file "output.txt"
      • Save initially to your "MyDocuments" folder
      • Test frequently - here is how your "output.txt" file should look:
        F 32 C 0
        F 68 C 20
        F 77 C 25
        F 86 C 30
        F 212 C 100
        C 0 F 32
        C 20 F 68
        C 25 F 77
        C 30 F 86
        C 100 F 212
        
      • Copy to your "H:/" drive
    3. CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
    4. Work on your Computer Science PowerPoint presentation

34 03/20/06 Monday - SkillsUSA, C++ Classes, "cppCards"
  1. Classroom Discussion -
    1. This week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
    2. SkillsUSA home page - Contest Updates:
    3. C++ - about.com - Chapter 17 - Classes, Methods, Members
  2. Lab Assignment -
    1. Create a C++ program "cppCards", build & assign a card class to be used to create computer card games:
      • Build a class "card"
      • Declare two "private" member variables: "string suit" & "string value"
      • Declare a default constructor & destructor
      • Declare four "public" method functions: "setSuit()", "setValue()", "getSuit()", "getValue()"
      • Define the work that each method function will perform
      • Create variables "int i", "string suit", "string value"
      • Create four array variables of type "card": "club", "diamond", "heart", "spade"
      • Declare & define a function "loadCards()" to accept an array of type "card" & a string a parameters & then initialize each part of the "card" that was passed
      • In the "main()" load all the cards & display them all out to check for accuracy
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    2. CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
    3. Work on your Computer Science PowerPoint presentation

35 03/21/06 Tuesday - Technology Vocabulary, Random Number, Format Currency, C++ Constructors & Destructors, "cppCardDeal"
  1. Classroom Discussion -
    1. This week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
    2. Technology Vocabulary - a Daily Entertainment
    3. Format for Currency from arachnoid.com:
      #include <iomanip> // include at the top
      
      void showCurrency(double dv, int width = 14) // copy & paste the whole function
      {
      	const string radix = ".";
      	const string thousands = ",";
      	const string unit = "$";
      	unsigned long v = (unsigned long) ((dv * 100.0) + .5);
      	string fmt,digit;
      	int i = -2;
      	do {
      		if(i == 0) { fmt = radix + fmt; }
      		if((i > 0) && (!(i % 3))) { fmt = thousands + fmt; }
      		digit = (v % 10) + '0';
      		fmt = digit + fmt;
      		v /= 10;
      		i++;
      	}
      	while((v) || (i < 1));
      	cout << unit << setw(width) << fmt.c_str() << endl;
      }
      
      showCurrency(123.45,0); // where 123.45 is the double amount & 0 is minimum width
      
    4. about.com - Random numbers page:
      #include <cstdlib> // include at the top
      #include <ctime>
      
      int i, j, lowNum = 1, highNum = 10; // programmer specified low & high numbers
      
      cout << "Starting at "; // user specified low number
      cin >> lowNum;
      cout << "Ending at   "; // user specified high number
      cin >> highNum;
      srand( (unsigned)time( NULL ) ); // starting - like Randomize in Visual Basic
      for(j = 0; j < 1000; j++) { rand(); } //increases randomness of advice
      for(i=1;i<=20;i++) { // get random number between lowNum & highNum, inclusive
      	j = (int) (highNum - lowNum + 1) * rand() / (RAND_MAX + 1.0) + lowNum;
          cout << j << " ";
      }
      
    5. C++ - about.com - Chapter 18 - Constructors & Destructors
  2. Lab Assignment -
    1. I've modified my "cppCards" to include a member "pos" & methods for setting & getting the value. "pos" will hold the numerical value, for example "2" = 2 & "Ace" = 14. This will allow me to compare cards numerically as well as with string. It's on the "Q:" drive if you want it
    2. Create a C++ program "cppCardDeal" card game, deal a hand of cards to a set of players, uses random numbers:
      • Copy from "cppCards" into "cppCardDeal"
      • Copy the random number generator from above
      • Initialize all cards
      • New variables: ranNum, lowNum, highNum, suitNum, cardNum
      • New variables: deck[53] & player1[6] of data type Card class
      • Create a new function "loadDeck()" & write code to place all 52 cards (13 cards in each of 4 suits)
      • Create a new function "pickCard()" & use a random number to one card - (1-52) from deck[]
      • Call "pickCard()" five times & display all five cards
      • Run several times - do you see a problem? - I sometimes get duplicate cards - this needs fixin'
      • In real life, when you "draw a card" you remove it form the "deck" - we have to duplicate this programmaticly:
        • Get a random number between (1-52) say "25"
        • When you physically pull card #25 from the deck so it can't be redrawn all the other cards are moved closer
        • Do this in a loop - move card #26 to position #25, move card #27 to position #26, etc.
        • From ranNum to highNum, move each card down one
        • Now there are only 51 cards in the deck to randomly draw from
        • Get it???
      • Re-write function "pickCard()" to reduce the number of cards in the "deck[]" by 1 each time the function is called
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    3. CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
    4. Work on your Computer Science PowerPoint presentation

36 03/22/06 Wednesday - Career, C++ Dynamic Memory Allocation, "cppCard21"
  1. Classroom Discussion -
    1. This week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
    2. Career - comparing large companies with small ones:
    3. C++ - about.com - Chapter 19 - Dynamic Memory Allocation
  2. Lab Assignment -
    1. Create a C++ program "cppCard21" card game blackjack:
      • Create a new project win32 console application & file source code
      • Copy from yesterday's "cppCardDeal" & modify for two players & 2 cards each
      • New variables: int score1 = 0, score2 = 0, scoreT = 0;
      • Pick a card for player1
      • Get scoreT from getPos()
      • If scoreT == 14 then scoreT = 15
      • If scoreT > 10 & scoreT < 15 then scoreT = 10, 10 points for Jack, Queen, & King
      • Add scoreT to score1
      • Repeat for player2
      • Pereat for 2 cards each
      • Determine who wins or if it's a tie score
      • Display cards for each player
      • Display score for each player
      • Display who wins
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    2. Form into teams of 2-students & register for the Project Hoshimi Programming Battle - we'll work on this as a class assignment over the coming weeks
    3. CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
    4. Work on your Computer Science PowerPoint presentation

37 03/23/06 Thursday - Science, C++ Copy Constructors, "cppCardPoker"
  1. Classroom Discussion -
    1. This week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
    2. Science - How Laptops Work from howStuffWorks.com
    3. C++ - about.com - Chapter 20 - Copy Constructors
  2. Lab Assignment -
    1. Create a C++ program "cppCardPoker" card game, simple winner, 4-of-a-kind beats 3-of-a-kind beats a pair:
      • Make a new Project Win32 Console Application & File Source File
      • Copy & paste everything from "card21"
      • Poker has five cards so change to "player1[6]" & "player2[6]"
      • Change the "dealCards()" loop to deal five cards to each player (loop 5 times)
      • Remove all lines using "score1", "score2", & "scoreT"
      • Test by displaying to see that you get five different cards for each player
      • Figure out how to determine a winner - assign these points:
        • 5 points for 4-of-a-kind
        • 4 points for full-house (3-of-a-kind & 2-of-a-kind)
        • 3 points for 3-of-a-kind
        • 2 points for 2 different 2-of-a-kind
        • 1 points for 2-of-a-kind
      • You can count how many of each value of card using another array: new variables: "int countCards1[15], countCards2[15]"
      • Add code in a function "initCountCards()" to initialize all elements of countCards1[] and countCards2[] to 0
      • Add code to call the function "initCountCards()" in the "main()"
      • Add code after picking a card for player1 to increment the "getPos()" element of "countCards1[]"
      • Add code after picking a card for player2 to increment the "getPos()" element of "countCards2[]"
      • Test by displaying all elements of both countCard arrays
      • After dealing all the cards, reset score1 & score to zero
      • Loop through every element in both countCards[]
      • Test by displaying both countCards[]
      • For each countCards[], increment score1 or score 2:
        • If countCards[] is 2, add 1
        • Two pairs will create a score of 2
        • If countCards[] is 3, add 3
        • A full house will create a score of 4
        • If countCards[] is 4, add 5
      • The winner has the higher score - determine & display the winner
      • If both players have the same score - display a tie game
      • If neither player has a winning hand (score1 = 0 and score2 = 0) display a no winner message
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    2. Form into teams of 2-students & register for the Project Hoshimi Programming Battle - we'll work on this as a class assignment over the coming weeks
    3. CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
    4. Work on your Computer Science PowerPoint presentation

38 03/24/06 Friday - Math, C++ Quiz Multiple-Choice, "cppCardHigh"
  1. Classroom Discussion -
    1. Math - Ms. Verde will discuss Hexadecimal Conversions
    2. Multiple-choice quiz, write-a-program quiz, work on your powerpoint
    3. C++ - about.com - our online text for reference
    4. Have a Great Day!!!
  2. Lab Assignment -
    1. QUIZ - Take the C++ Quiz 3. 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
    2. QUIZ - Create a C++ program "cppCardHigh" card game, draw two cards, high card wins:
      • Create a new Project Win32 Console Application & File Source File
      • War, also called High Card, is a simple game wherein two players each draw one card & the player with the highest card wins
      • Our game will play all 52 cards once, in pairs, for a total of 26 hands, the winning player will have drawn the high card most often
      • Copy & paste everything from "card21"
      • Each player will receive 26 cards, so define array variables as "player1[27]" & "player2[27]"
      • You need a new variable "int scoreT2 = 0"
      • After dealing each pair of cards, assign "scoreT = player1[j].getPos()" and "scoreT2 = player2[j].getPos()"
      • Determine which card is higher:
        1. If "scoreT > scoreT2" then increment "score1++" and display both cards
        2. Else if "scoreT < scoreT2" then increment "score2++" and display both cards
        3. Else (they're the same) just display both cards
      • After all cards have been dealt (26 hands) determine a grand winner and display a winner message
        1. If "score1 > score2" then player 1 had more high cards
        2. Else if "score1 < score2" then player 2 had more high cards
        3. Else both players had identical pairs of high cards and it's a tie
      • Make your output visually appealing with plenty of descriptions for the user to read
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    3. Form into teams of 2-students & register for the Project Hoshimi Programming Battle - we'll work on this as a class assignment over the coming weeks
    4. CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
    5. DUE NEXT FRIDAY 03/31/06 - Work on your Computer Science PowerPoint presentation

39 03/27/06 Monday - English, C++ Arrays as Class Objects, "cppBattleShip" Part I - the game board
  1. Classroom Discussion -
    1. English - Ms. Gerick will visit & discuss job applications
    2. C++ - about.com - Lesson 21: Arrays of Class Objects
  2. Lab Assignment -
    1. Program Quiz from Friday 03/24 is still due - subtract 10 points for each day late
    2. Create a C++ program "cppBattleShip" to play the game
      • Create a new C++ Project Win32 Console Application & File Source File
      • General rules for BattleShip can be found on the wikipedia.com web site
      • Our gameboard will be of a grid 11 by 11
      • Ship pieces are placed horizontally or vertically, but never diagonally
      • Our pieces (ships) will be:
        1. [A]ircraft Carrier = 5 squares
        2. [B]attleship = 4 squares
        3. [C]ruiser = 3 squares
        4. [D]estroyer = 2 squares
        5. [S]ubmarine = 2 squares
      • Overview of game design steps:
        1. Draw the gameboard, 11 by 11 dots with letters across the top for column identification and numbers down the side for row identification
        2. Read from the player where to place his ships
        3. The computer will place its ships randomly
        4. Draw two gameboards, the first shows player ships & computer shots, misses, & hits, the second shows blank spaces & player shots, misses, & hits
        5. Draw the gameboard with the period key symbol on an 11 by 11 grid
        6. Use uppercase letters to show the ships positions
        7. Player & computer take turns shooting, 1 shot per turn
        8. The gameboard is redrawn after each turn (1 player shot & 1 computer shot)
        9. Read from the player where to shoot at the computer ships
        10. The computer will shoot at the user ships randomly
        11. A hit is defined as when a shot duplicates a ship placement
        12. When all ships of player or computer are "sunk", game ends
      • Step 1: Draw the game board(s), for example:
                 Player:                     Computer:
           A B C D E F G H I J K       A B C D E F G H I J K
         1 . . . . . . . . . . .     1 . . . . . . . . . . .
         2 . . . . . . . . . . .     2 . . . . . . . . . . .
         3 . . . . . . . . . . .     3 . . . . . . . . . . .
         4 . . . . . . . . . . .     4 . . . . . . . . . . .
         5 . . . . . . . . . . .     5 . . . . . . . . . . .
         6 . . . . . . . . . . .     6 . . . . . . . . . . .
         7 . . . . . . . . . . .     7 . . . . . . . . . . .
         8 . . . . . . . . . . .     8 . . . . . . . . . . .
         9 . . . . . . . . . . .     9 . . . . . . . . . . .
        10 . . . . . . . . . . .    10 . . . . . . . . . . .
        11 . . . . . . . . . . .    11 . . . . . . . . . . .
        
      • Step 2: Get the Player ship positions, for example:
        Player, what col will your Aircraft Carrier start on? (A-G): C // player selected 'C'
        Player, what row will your Aircraft Carrier start on? (1-7): 2 // player selected '2'
        Player, [H]orizontal or [V]ertical: H // player selected 'H'
        // repeat for Battleship, Cruiser, Destroyer, & Submarine
                 Player:                     Computer:
           A B C D E F G H I J K       A B C D E F G H I J K
         1 . . . . . . . . . . .     1 . . . . . . . . . . .
         2 . . A A A A A . . . .     2 . . . . . . . . . . .
         3 . . . . . . . . . . .     3 . . . . . . . . . . .
         4 . . . . . . B B B B .     4 . . . . . . . . . . .
         5 . . . . . . . . . . .     5 . . . . . . . . . . .
         6 . . . . . . . . . . .     6 . . . . . . . . . . .
         7 . C . . . . . . . . .     7 . . . . . . . . . . .
         8 . C . . . . . . . . .     8 . . . . . . . . . . .
         9 . C . . . . . . . . .     9 . . . . . . . . . . .
        10 . . D D . . . S S . .    10 . . . . . . . . . . .
        11 . . . . . . . . . . .    11 . . . . . . . . . . .
        
      • Step 3: Randomly assign the Computer ship positions
      • Step 4: Play a round:
        1. Get Player shot position
        2. Determine if hit or miss
        3. Randomly get Computer shot position
        4. Determine if hit or miss
        5. Display results by redrawing board
      • Step 5: Keep track of score & stop game if find a winner
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    3. DUE FRIDAY 03/31/06 - Work on your Computer Science PowerPoint presentation

40 03/28/06 Tuesday - Vocabulary, C++ Mutable Members, "cppBattleShip" Part II - placing the ships
  1. Classroom Discussion -
    1. Technology Vocabulary - a daily symposium
    2. C++ - about.com - Lesson 22: Mutable Members
  2. Lab Assignment -
    1. Program assignment - Create a C++ program to simulate a simple calculator:
      • Read a number (int or float)
      • Read a math symbol (+ - * /)
      • Read a second number
      • Perform the appropriate mathematically operation
      • Display all numbers, symbols, & answer to the user
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    2. Part II of "BattleShip"
    3. DUE FRIDAY 03/31/06 - Work on your Computer Science PowerPoint presentation

41 03/29/06 Wednesday - Career, C++ Static Members & Methods, "cppBattleShip" Part III - recording shots & hits
  1. Classroom Discussion -
    1. Career - Résumé Review - from Quintessential Careers
    2. C++ - about.com - Lesson 23: Static Members and Methods
  2. Lab Assignment -
    1. Program assignment - Create a C++ program to display a times table:
      • Read a number from the user
      • Display a times table for that number times 1 to 12
      • For example, if the user chooses "3":
        3 x 1 = 3
        3 x 2 = 6
        3 x 3 = 9 
        3 x 4 = 12 
        3 x 5 = 15
        3 x 6 = 18
        3 x 7 = 21
        3 x 8 = 24
        3 x 9 = 27
        3 x 10 = 30
        3 x 11 = 33
        3 x 12 = 36
        
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    2. Part III of "BattleShip"
    3. DUE FRIDAY 03/31/06 - Work on your Computer Science PowerPoint presentation

42 03/30/06 Thursday - Science, C++ This Pointer, "cppBattleShip" Part IV - keeping score
  1. Classroom Discussion -
    1. Science - How Google Earth Works from howstuffworks.com
    2. C++ - about.com - Lesson 24: This Pointer
  2. Lab Assignment -
    1. Program assignment - Create a C++ program to count how many words are in the Gettysburg Address:
      • Create a new C++ project/source file "gettysburg"
      • Find a copy of the Gettysburg Address online
      • Copy & paste into a text file "gettysburg.txt" in the proper folder
      • Be sure to include
        #include <iostream>
        #include <fstream>
        #include <string>
        
      • Open the text file for input:
        ifstream inFile("gettysburg.txt");
        
      • You can read 1 word at a time using:
        inFile >> word;
        
      • Display the entire speech back to the user
      • Count how many words there are
      • Tell the user how many words there are
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    2. Part IV of "BattleShip"
    3. DUE TOMORROW 03/31/06 - Work on your Computer Science PowerPoint presentation

43 03/31/06 Friday - SkillsUSA, C++ Overloaded Operators, "cppBattleShip" part V - final cleanup
  1. Classroom Discussion -
    1. SkillsUSA - PDP Level 1.3 "Time-Management Skills"
    2. C++ - about.com - Lesson 25: Overloaded Operators, Part I & Lesson 26: Overloaded Operators, Part II
  2. Lab Assignment -
    1. Program assignment - Create a C++ program to display how many times each letter of the alphabet is used in the Gettysburg Address:
      • You may modify yesterday's program
      • Declare 26 variables, 1 for each letter of the alphabet
      • Alternatively, you may declare 1 array of 26 (or 27) elements
      • Match each letter in each each word read to the correct variable or array element & increment
      • Display each of the 26 letters of the alphabet with the number of times it occured in the speech
      • Extra Credit - also show other characters but don't report characters that are not used
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    2. Program assignment - Create a C++ program to calculate Factorial! for a user supplied integer number:
      • The factorial n! is defined for a positive integer n as n * (n - 1) until n = 1
      • Read a number from the user
      • Loop from that number down to 1
      • Start with answer = 1
      • Multiply answer by the loop sentinel variable
      • Display the user number plus the answer
      • Extra Credit - Loop until the user chooses to exit
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    3. Program assignment - Create a C++ program to determine if three numbers would form a triangle:
      • Your user has three sticks - the user knows the length of each stick - let the user test to see if the three sticks placed in a triangular fashion would form a triangle
      • Pythagoras' Theorem: a2 + b2 = c2
      • Read 3 numbers from the user
      • Display whether the three numbers would form a triangle
      • Extra Credit - Suggest which number should be changed to properly form a triangle
      • Save initially to your "MyDocuments" folder
      • Test frequently
      • Copy to your "H:/" drive
    4. Part V of "BattleShip"
    5. DUE TODAY - Work on your Computer Science PowerPoint presentation

04/02/06 Sunday - Daylight Saving Time Starts - Spring Ahead
44 04/03/06 Monday - SkillsUSA, C++ Scope & Lifespan, "battleship", PowerPoint Demonstrations
  1. Classroom Discussion -
    1. SkillsUSA - PDP Level 1.3 "Time-Management Skills", cont'd
    2. SkillsUSA home page - Contest Updates:
    3. C++ - about.com - Lesson 28: Scope and Lifespan
    4. PowerPoint Demonstrations
  2. Lab Assignment -
    1. Complete the "battleship" game:
      • Get & record shots
      • Determine a winner
      • Hide the computer ship placements
    2. 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
    3. Marking Period 3 has ended

45 04/04/06 Tuesday - Vocabulary, C++ Inheritance, PowerPoint Demonstrations
  1. Classroom Discussion -
    1. Technology Vocabulary - an daily circulation
    2. C++ - about.com - Lesson 29: Inheritance
    3. PowerPoint Demonstrations
  2. Lab Assignment -
    1. Last call on "battleship" game
    2. 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
    3. 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
    4. Marking Period 3 has ended

46 04/05/06 Wednesday - Career, C++ Polymorphism, PowerPoint Demonstrations
  1. Classroom Discussion -
    1. Career - last update of the résumé
    2. C++ - about.com - Lesson 30: Polymorphism
    3. PowerPoint Demonstrations
  2. Lab Assignment -
    1. Catchup
    2. Marking Period 3 has ended

47 04/06/06 Thursday - Vocabulary, C++ Exceptions, PowerPoint Demonstrations
  1. Classroom Discussion -
    1. Science - How Networks Work from howstuffworks.com
    2. C++ - about.com - Lesson 34: Exceptions
    3. PowerPoint Demonstrations
  2. Lab Assignment -
    1. 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
    2. Catchup
    3. Marking Period 3 has ended

48 04/07/06 Friday - Math, Network Demonstration
  1. Classroom Discussion -
    1. Math, Ms. Verde & Hexadecimal numbers
    2. Networking discussion
  2. Lab Assignment -
    1. Networking demonstration
    2. Marking Period 3 has ended

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
04/18/06 Tuesday - School Resumes - start of Marking Period 4

webopedia
webster
whatis
vocabulary