|
|
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" |
|
- Classroom Discussion -
- English - the College Résumé
- Visual Basic review
- Lab Assignment -
- English résumé worksheet
- Complete our VB program "vbCypher4" using the matrix math Ms. Verde taught us Friday
- Using the formula we developed with Ms. Verde to produce an encoded message: n1 * m1 + n2 * m2 , n1 * m3 + n2 * n4 ,
- Open "vbCypher4"
- 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
- Place code for instructions e to h at the top of the Encode event
- Clear the output Text Object
- Set the variable "intComma" to zero
- Set the variable "intLength" to zero
- 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"
- If the input is an odd number of characters, make it even (you already have this)
- Get pairs of numbers from uppercase letters (you already have this)
- Add a call to a routine "doEncode()" to the "Case 2:" code segment
- 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
- Save & Test using the message "Happy Birthday" - if it works correctly, you will get the same coded message you got on Friday
- Create a VB program "vbBinary" to convert decimal numbers to binary numbers & back
|
| 2 |
01/31/06 |
|
Tuesday - Vocabulary, "vbRoman" |
|
- Classroom Discussion -
- Computer Vocabulary - a daily investigation
- Visual Basic review
- Lab Assignment -
- Vocabulary worksheet
- Create a VB program "vbRoman" to convert decimal numbers to Roman numbers & back
|
| 3 |
02/01/06 |
|
Wednesday - Career, "vbDice" |
|
- Classroom Discussion -
- Part II of résumé tutorial from quintcareers.com
- Visual Basic review
- Lab Assignment -
- Résumé worksheet
- Create a VB program "vbDice" to simulate rolling dice
|
| 4 |
02/02/06 |
|
Thursday - Science, "vbLineBall" |
|
- Classroom Discussion -
- Science - How Voice Over Internet Protocol works - from HowStuffWorks.com
- Visual Basic review
- Lab Assignment -
- Science worksheet
- Create a VB program "vbLineBall", a game with a bouncing ball in a dimishing space
|
| 5 |
02/03/06 |
|
Friday - SkillsUSA, "vbConclusion" |
|
- Classroom Discussion -
- SkillsUSA home page - Contest Updates:
- SkillsUSA - Level 1-2, something, something, something
- Visual Basic review
- Lab Assignment -
- PDP Blue Book worksheet
- 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" |
|
- Classroom Discussion -
- Skills USA -
- Some websites with good info on C++:
- C++ Lessons for Today:
- Lab Assignment -
- SkillsUSA PDP Blue Book lesson
- Familiarize with the Microsoft Visual C++ Integrated Development Environment
- Create a folder for C++
- Steps to create a C++ console program:
- Open C++
- File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
- File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
- Add code to the source window
- Compile -- Build, Compile
- Link -- Build, Build
- Run -- Build, Execute
- Compile, Link, Run -- one step -- click the exlamation point button
- Create a C++ program "cHelloWorld"
- Work on your Computer Science PowerPoint presentation
|
| 7 |
02/07/06 |
|
Tuesday - Morning Announcements (any volunteers?) - Technology Vocabulary, C++ Input/Output, "cppTemperature1" |
|
- Classroom Discussion -
- Technology Vocabulary - a daily experience
- C++ Lessons for Today:
- Lab Assignment -
- Technology Vocabulary - a daily experience
- Review -- Steps to create a C++ console program:
- Open C++
- File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
- File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
- Add code to the source window
- Compile -- Build, Compile
- Link -- Build, Build
- Run -- Build, Execute
- Compile, Link, Run -- one step -- click the exlamation point button
- Create a C++ program "cppVariableDemo"
- Create a C++ program "cppTemperaturer" - convert 86 Fahrenheit to Centigrade
- Work on your Computer Science PowerPoint presentation
|
| 8 |
02/08/06 |
|
Wednesday - Morning Announcements (any volunteers?) - Career, C++ Decisions 1, "cppGrades" |
|
- Classroom Discussion -
- Résumé review & practice
- C++ - about.com - Decisions 1 - If
- Lab Assignment -
- Review & update your résumé
- Review -- Steps to create a C++ console program:
- Open C++
- File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
- File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
- Add code to the source window
- Compile -- Build, Compile
- Link -- Build, Build
- Run -- Build, Execute
- Compile, Link, Run -- one step -- click the exlamation point button
- Create a C++ program "cppGrades" - get
fahrenheit temperature, display centigrade temperature
- Work on your Computer Science PowerPoint presentation
|
| 9 |
02/09/06 |
|
Thursday - Morning Announcements (any volunteers?) - Science, C++ Decisions 2, "cppSalary" |
|
- Classroom Discussion -
- Science - How Keyboards work - from HowStuffWorks.com
- Keyboard Safety & ergonomics
- DataHand ergonomic keyboards for sale
- SafeType ergonomic keyboards for sale
- C++ - about.com - Decisions 2 - Switch Case
- Lab Assignment -
- Review -- Steps to create a C++ console program:
- Open C++
- File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
- File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
- Add code to the source window
- Compile -- Build, Compile
- Link -- Build, Build
- Run -- Build, Execute
- Compile, Link, Run -- one step -- click the exlamation point button
- Create a C++ program "cppSalary" - get hours worked & pay rate, display weekly salary
- 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" |
|
- Classroom Discussion -
- Math - matrix inversions & decoding with Ms. Verde
- C++ - about.com - Loops - While, Do Whlie, For
- Lab Assignment -
- Math worksheet
- Review -- Steps to create a C++ console program:
- Open C++
- File, New, Project Tab = "Console Application", Name the project, Select a Location, click [OK], select "Empty Project", click [FINISH], click [OK]
- File, New, Files Tab = "C++ Source File", Name the file name, click [OK]
- Add code to the source window
- Compile -- Build, Compile
- Link -- Build, Build
- Run -- Build, Execute
- Compile, Link, Run -- one step -- click the exlamation point button
- 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
- QUIZ - Create a C++ program "cppRoomArea" - get width length of room, display area of room
- 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" |
|
- Classroom Discussion -
- English - Ms. Gerrick will visit & review your résumés
- C++ - about.com - Intro to Pointers
- Lab Assignment -
- Create a C++ program "cppPointerDemo" - practice with pointers
- 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
- Work on your Computer Science PowerPoint presentation
|
| 12 |
02/14/06 |
|
Tuesday - Microsoft Word practice labs |
|
- Classroom Discussion -
Mr Clarke out sick with snow-related back injury
Lab Assignment -
- 3-part lab practice using Microsoft Word
- Work on your Computer Science PowerPoint presentation
|
| 13 |
02/15/06 |
|
Wednesday - Visual Basic practice labs |
|
- 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!
Lab Assignment - 3 Programming Assignments to Practice Visual Basic Programming
- Multi-Dice - Create a Visual Basic program "css50vbMultiDice" to simulate rolling multiple dice of different sizes:
- Allow the user to choose how many dice, minimum 1, maximum 5, you may use radio buttons instead of a text box
- 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
- Use a command button to go
- Use a picture box for output
- Clear the output picture box
- Don't forget "Randomize"
- Loop for how many dice, you may use a while loop or a for loop
- Display a pseudo-random number onto a picture box
- Keep track of totals
- Display total numbers rolled after the loop ends
- Save on your "H:/vb" drive
- 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:
- Visual Basic allows for subtraction of dates & will return the number of days that separate them
- Allow the user to input a date
- Use a command button to go
- Create two date variables "dteInput" & "dteToday"
- Create an integer variable "intDiff"
- Clear your output
- If your input is not blank
- If yout input "isDate()"
- Assign the return from the Visual Basic built-in routine "Now()" to "dteToday"
- Use "CDate()" to convert the input to a date data type & assign to "dteInput"
- Determine whether to subtract today from input or input from today using an "If" statement
- Subtract the first from the second & display appropriate output
- Otherwise subtract the second from the first & display appropriate output
- Test with "1/1/01" (45 days ago) & "6/15/06" (120 days from today)
- Save on your "H:/vb" drive
- Discount Value - Create a Visual Basic program "css50vbDiscount" to determine a discount value given a discount percentage or vice versa:
- Discounts in a store are given in percentages or in dollar amounts off a starting price
- Create a form to accept a starting price & 1) a discount percentage or 2) a dollar amount off
- If discount percentage, display the dollar amount off & final price
- If dollar amount off, display the discount percentage & final amount
- Save on your "H:/vb" drive
- Roman Numbers - Create a Visual Basic program to convert a decimal number to Roman numbers or vice versa:
- (AM class has started this already
- 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
- Input is either a decimal number or Roman number symbols
- By decimal, I mean a base 10 integer number not contain a fractional amount
- Allow the user or the program to determine the conversion
- Decimal to Roman conversion works similar to calculating change: use modulus then integer division
- 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
- It gets complicated -- test frequently
- Test using easily converted numbers:
- Some of the numbers exampled above
- MMVI = 2006
- MCMXCIV = 1994
- MCMDXXXVI = 1986
- Save on your "H:/vb" drive
Binary - Create a Visual Basic program to convert a decimal number to Binary numbers or vice versa:
- Decimal to Binary is easy: use modulus & integer division
- 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
- Save on your "H:/vb" drive
Number Puzzle - Create a Visual Basic program to play the game:
- Just do it!

- Click on a number to move it to the blank space
- Arrange the numbers in sequence from top left to bottom right
- Save on your "H:/vb" drive
Work on your Computer Science PowerPoint presentation
|
| 14 |
02/16/06 |
|
Thursday - |
|
|
|
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" |
|
- Classroom Discussion -
- C++ - about.com - Review
- 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++;
}
- cPlusPlus.com - tutorial
- binary file I/O - tutorial
- Lab Assignment -
- Create a C++ program "cppLoopStars" - practice with decisions & loops
- Create a C++ program "cppGPA" - practice with NJIT Contest sample problems
- Work on your Computer Science PowerPoint presentation
|
| 16 |
02/22/06 |
|
Wendesday - C++ Practice, "cppTicTacToe", "cppPrime" |
|
- Classroom Discussion -
- C++ - about.com - Review
- Lab Assignment -
- Create a C++ program "cppTicTacToe" - practice with decisions & loops
- Create a C++ program "cppPrime" - practice with NJIT Contest sample problems
- Work on your Computer Science PowerPoint presentation
|
| 17 |
02/23/06 |
|
Thursday - C++ Practice, "cppTowerOfHanoi", "cppTemperature" |
|
- Classroom Discussion -
- C++ - about.com - Review
- Lab Assignment -
- Create a C++ program "cppTowerOfHanoi" - practice with decisions & loops
- Create a C++ program "cppTemperature" - practice with NJIT Contest sample problems
- Work on your Computer Science PowerPoint presentation
|
| 18 |
02/24/06 |
|
Friday - SkillsUSA, C++ Practice, "cppHangMan", "cppSquareRoots", "cppBinary" |
|
- Classroom Discussion -
- SkillsUSA home page - Contest Updates:
- C++ - about.com - Review
- Lab Assignment -
- Create a C++ program "cppHangMan" - practice with decisions & loops
- Create a C++ program "cppSquareRoots" - practice with NJIT Contest sample problems
- Create a C++ program "cppBinary" - practice with NJIT Contest sample problems
- Work on your Computer Science PowerPoint presentation
|
| 19 |
02/27/06 |
|
Monday - English, C++ Pointers, "cpp99Bottles" |
|
- Classroom Discussion -
- Ms. Gerick will visit & review your résumés
- C++ - about.com - Chapter 8 - Introduction to Pointers
- Lab Assignment -
- I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
- Create a C++ program "cppPointerDemo" - practice with pointers
- 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
- Work on your Computer Science PowerPoint presentation
|
| 20 |
02/28/06 |
|
Tuesday - Vocabulary, C++ Classes, "cppStudents" |
|
- Classroom Discussion -
- Techology Vocabulary - a daily convention
- C++ - about.com - Chapter 9 - Introduction to Classes
- Lab Assignment -
- I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
- Create a C++ program "cppClassDemo" - practice with classes
- 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
- Work on your Computer Science PowerPoint presentation
|
| 21 |
03/01/06 |
|
Wednesday - Career, C++ Arrays & Vectors, "cppGrades2" |
|
- Classroom Discussion -
- Online
- C++ - about.com - Chapter 10 - Arrays & Vectors
- Lab Assignment -
- I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
- Create a C++ program "cppArrayDemo" - practice with arrays
- 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
- Work on your Computer Science PowerPoint presentation
|
| 22 |
03/02/06 |
|
Thursday - Science, C++ Strings, "cppMadLibs" |
|
- Classroom Discussion -
- Science - How Laser Printers work
- Science - How Inkjet Printers work
- C++ - about.com - Chapter 11 - Strings
- 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
- 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?
- Lab Assignment -
- I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
- Create a C++ program "cppStringDemo" - practice with strings
- 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
- Work on your Computer Science PowerPoint presentation
|
| 23 |
03/03/06 |
|
Friday - SkillsUSA, C++ Quiz = "cppHangMan" |
|
- Classroom Discussion -
- SkillsUSA home page - Contest Updates:
- PDP - Level 1-2, Goals & Motivation
- C++ Review
- Lab Assignment -
- I am going to clean up the "Q:" drive -- make sure you have a copy of all your work on your "H:" drive
- 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" |
|
- Classroom Discussion -
- SkillsUSA home page - Contest Updates:
- PDP - Level 1-2, Goals & Motivation
- C++ Practice
- Lab Assignment -
- PDP - Complete Level 1-2, Goals & Motivation
- Complete the C++ program "cppHangMan" from Friday
- 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" |
|
- Classroom Discussion -
- Techology Vocabulary - a daily supposition
- C++ Practice
- Lab Assignment -
- 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" |
|
- Classroom Discussion -
- Career Review - What do we know so far?
- C++ Practice
- Lab Assignment -
- 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" |
|
- Classroom Discussion -
- Coordinated class with Health & Fitness (9:30 & 12:30)
- Roman Numbers
- Lab Assignment -
- 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" |
|
- Classroom Discussion -
- Ms. Verde will visit & discuss binary numbers
- Binary Numbers
- Lab Assignment -
- 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" |
|
- Classroom Discussion -
- Ms. Gerick will visit & discuss Help Wanted Advertisements & Job Applications
- C++ - about.com - Chapter 12 - File Input/Output
- Lab Assignment -
- English worksheets
- 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" |
|
- Classroom Discussion -
- Techology Vocabulary - a daily wonderment
- C++ - about.com - Chapter 13 - References (just read)
- Behave!!!
- Lab Assignment -
- 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 Number | Decimal Number |
| 33 | 21 |
| 8A | 138 |
| FF | 255 |
| Decimal to Hexadecimal |
| Decimal Number | Hexadecimal Number |
| 16 | 10 |
| 128 | 80 |
| 210 | D2 |
- Copy to your "H:/" drive
- 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 Number | Decimal Number |
| 012 | 12 |
| 234 | 156 |
| 345 | 229 |
| Decimal to Octal |
| Decimal Number | Octal Number |
| 8 | 10 |
| 88 | 130 |
| 255 | 377 |
- Copy to your "H:/" drive
- 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:
| Radius | Circumference | Area |
| 1 | 6.2824 | 3.1412 |
| 2 | 12.5648 | 12.5648 |
| 3 | 18.8472 | 28.2708 |
- Copy to your "H:/" drive
|
| 31 |
03/15/06 |
|
Wednesday - Career, C++ Function Basics, "cppDistanceConverter" |
|
- Classroom Discussion -
- Explore What Interests You? at the Bureau of Labor Statistics website
- C++ - about.com - Chapter 14 - Function Basics
- Lab Assignment -
- Browse website
- 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-To | Enter |
| Inches to Centimeters | IC |
| Feet to Meters | FM |
| Miles to Kilometers | MK |
| Centimeters to Inches | CI |
| Meters to Feet | MF |
| Kilometers to Miles | KM |
- 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:
| Conversion | Input | Result |
| Inches to Centimeters | 10 | 25.4 |
| Feet to Meters | 10 | 3.05 |
| Miles to Kilometers | 10 | 16 |
| Centimeters to Inches | 10 | 4 |
| Meters to Feet | 10 | 33 |
| Kilometers to Miles | 10 | 6 |
- Copy to your "H:/" drive
|
| 32 |
03/16/06 |
|
Thursday - Science, C++ Function Overloading, "cppTemperature2" |
|
- Classroom Discussion -
- Science - How Bits & Bytes Work from howStuffWorks.com
- C++ - about.com - Chapter 15 - Function Overloading
- Lab Assignment -
- 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:
| Input | Result |
| F | 32 | 0 |
| F | 212 | 100 |
| C | 0 | 32 |
| C | 100 | 212 |
- Copy to your "H:/" drive
- CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
- Work on your Computer Science PowerPoint presentation
|
| 33 |
03/17/06 |
|
Friday - SkillsUSA, C++ Quiz 2, C++ Function Templates, "cppTemperature3" |
|
- Classroom Discussion -
- Next week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
- SkillsUSA home page - Contest Updates:
- PDP - Level 1-2, Goals & Motivation
- C++ - about.com - Chapter 16 - Function Templates
- Lab Assignment -
- 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
- Create a C++ program "cppTemperature3" using Function Templates:
- CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
- Work on your Computer Science PowerPoint presentation
|
| 34 |
03/20/06 |
|
Monday - SkillsUSA, C++ Classes, "cppCards" |
|
- Classroom Discussion -
- This week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
- SkillsUSA home page - Contest Updates:
- C++ - about.com - Chapter 17 - Classes, Methods, Members
- Lab Assignment -
- 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
- CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
- Work on your Computer Science PowerPoint presentation
|
| 35 |
03/21/06 |
|
Tuesday - Technology Vocabulary, Random Number, Format Currency, C++ Constructors & Destructors, "cppCardDeal" |
|
- Classroom Discussion -
- This week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
- Technology Vocabulary - a Daily Entertainment
- 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
- 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 << " ";
}
- C++ - about.com - Chapter 18 - Constructors & Destructors
- Lab Assignment -
- 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
- 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
- CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
- Work on your Computer Science PowerPoint presentation
|
| 36 |
03/22/06 |
|
Wednesday - Career, C++ Dynamic Memory Allocation, "cppCard21" |
|
- Classroom Discussion -
- This week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
- Career - comparing large companies with small ones:
- C++ - about.com - Chapter 19 - Dynamic Memory Allocation
- Lab Assignment -
- 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
 |
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
|
- CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
- Work on your Computer Science PowerPoint presentation
|
| 37 |
03/23/06 |
|
Thursday - Science, C++ Copy Constructors, "cppCardPoker" |
|
- Classroom Discussion -
- This week is "Student Visitation Week" -- bring a friend from your home school to see what CompSci is like -- visit home school guidance first
- Science - How Laptops Work from howStuffWorks.com
- C++ - about.com - Chapter 20 - Copy Constructors
- Lab Assignment -
- 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
 |
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
|
- CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
- Work on your Computer Science PowerPoint presentation
|
| 38 |
03/24/06 |
|
Friday - Math, C++ Quiz Multiple-Choice, "cppCardHigh" |
|
- Classroom Discussion -
- Math - Ms. Verde will discuss Hexadecimal Conversions
- Multiple-choice quiz, write-a-program quiz, work on your powerpoint
- C++ - about.com - our online text for reference
- Have a Great Day!!!
- Lab Assignment -
- 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
- 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:
- If "scoreT > scoreT2" then increment "score1++" and display both cards
- Else if "scoreT < scoreT2" then increment "score2++" and display both cards
- 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
- If "score1 > score2" then player 1 had more high cards
- Else if "score1 < score2" then player 2 had more high cards
- 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
 |
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
|
- CHECK YOUR GRADES for Marking Period 3 - complete any incomplete assignments
- 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 |
|
- Classroom Discussion -
- English - Ms. Gerick will visit & discuss job applications
- C++ - about.com - Lesson 21: Arrays of Class Objects
- Lab Assignment -
- Program Quiz from Friday 03/24 is still due - subtract 10 points for each day late
- 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:
- [A]ircraft Carrier = 5 squares
- [B]attleship = 4 squares
- [C]ruiser = 3 squares
- [D]estroyer = 2 squares
- [S]ubmarine = 2 squares
- Overview of game design steps:
- Draw the gameboard, 11 by 11 dots with letters across the top for column identification and numbers down the side for row identification
- Read from the player where to place his ships
- The computer will place its ships randomly
- Draw two gameboards, the first shows player ships & computer shots, misses, & hits, the second shows blank spaces & player shots, misses, & hits
- Draw the gameboard with the period key symbol on an 11 by 11 grid
- Use uppercase letters to show the ships positions
- Player & computer take turns shooting, 1 shot per turn
- The gameboard is redrawn after each turn (1 player shot & 1 computer shot)
- Read from the player where to shoot at the computer ships
- The computer will shoot at the user ships randomly
- A hit is defined as when a shot duplicates a ship placement
- 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:
- Get Player shot position
- Determine if hit or miss
- Randomly get Computer shot position
- Determine if hit or miss
- 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
- 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 |
|
- Classroom Discussion -
- Technology Vocabulary - a daily symposium
- C++ - about.com - Lesson 22: Mutable Members
- Lab Assignment -
- 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
- Part II of "BattleShip"
- 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 |
|
- Classroom Discussion -
- Career - Résumé Review - from Quintessential Careers
- C++ - about.com - Lesson 23: Static Members and Methods
- Lab Assignment -
- Program assignment - Create a C++ program to display a times table:
- Part III of "BattleShip"
- 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 |
|
- Classroom Discussion -
- Science - How Google Earth Works from howstuffworks.com
- C++ - about.com - Lesson 24: This Pointer
- Lab Assignment -
- Program assignment - Create a C++ program to count how many words are in the Gettysburg Address:
- Part IV of "BattleShip"
- 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 |
|
- Classroom Discussion -
- SkillsUSA - PDP Level 1.3 "Time-Management Skills"
- C++ - about.com - Lesson 25: Overloaded Operators, Part I & Lesson 26: Overloaded Operators, Part II
- Lab Assignment -
- 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
- - 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
- 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
- - Loop until the user chooses to exit
- Save initially to your "MyDocuments" folder
- Test frequently
- Copy to your "H:/" drive
- 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
- - Suggest which number should be changed to properly form a triangle
- Save initially to your "MyDocuments" folder
- Test frequently
- Copy to your "H:/" drive
- Part V of "BattleShip"
- 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 |
|
- Classroom Discussion -
- SkillsUSA - PDP Level 1.3 "Time-Management Skills", cont'd
- SkillsUSA home page - Contest Updates:
- C++ - about.com - Lesson 28: Scope and Lifespan
- PowerPoint Demonstrations
- Lab Assignment -
- Complete the "battleship" game:
- Get & record shots
- Determine a winner
- Hide the computer ship placements
- Do another one of the following group:
- Program assignment - Create a C++ program to display how many times each letter of the alphabet is used in the Gettysburg Address - specifications last Friday
- Program assignment - Create a C++ program to calculate Factorial! for a user supplied integer number - specifications last Friday
- Program assignment - Create a C++ program to determine if three numbers would form a triangle - specifications last Friday
- Marking Period 3 has ended
|
| 45 |
04/04/06 |
|
Tuesday - Vocabulary, C++ Inheritance, PowerPoint Demonstrations |
|
- Classroom Discussion -
- Technology Vocabulary - an daily circulation
- C++ - about.com - Lesson 29: Inheritance
- PowerPoint Demonstrations
- Lab Assignment -
- Last call on "battleship" game
- Do another one of the following group:
- Program assignment - Create a C++ program to display how many times each letter of the alphabet is used in the Gettysburg Address - specifications last Friday
- Program assignment - Create a C++ program to calculate Factorial! for a user supplied integer number - specifications last Friday
- Program assignment - Create a C++ program to determine if three numbers would form a triangle - specifications last Friday
- Program assignment - Create a C++ program to let the computer write a poem:
- Create a new console application & source file "poetry"
- Copy the text file "poetryWords.txt" from the "Q:" drive (or find your own list on the internet)
- There are almost 1000 words in "words.txt" - read them all until EOF into an array variable
- Randomly choose & display words to form a computer poem
- Determine what looks best:
- How many lines? 4?
- How many words per line? 7?
- Should the number of words on each line vary?
- Can you place words based on the number of syllables in each word?
- Save initially to your "MyDocuments" folder
- Test frequently
- Copy to your "H:/" drive
- Marking Period 3 has ended
|
| 46 |
04/05/06 |
|
Wednesday - Career, C++ Polymorphism, PowerPoint Demonstrations |
|
- Classroom Discussion -
- Career - last update of the résumé
- C++ - about.com - Lesson 30: Polymorphism
- PowerPoint Demonstrations
- Lab Assignment -
- Catchup
- Marking Period 3 has ended
|
| 47 |
04/06/06 |
|
Thursday - Vocabulary, C++ Exceptions, PowerPoint Demonstrations |
|
- Classroom Discussion -
- Science - How Networks Work from howstuffworks.com
- C++ - about.com - Lesson 34: Exceptions
- PowerPoint Demonstrations
- Lab Assignment -
- QUIZ - Take the C++ Quiz 4. Click the link & follow the instructions. PRINT & HAND IN. Open notes, open internet, open C++ IDE (you may try out your answer in a program before you submit it), you may ask me for clarification, you may NOT ask me for the answers, likewise you may NOT ask another student for help
- Catchup
- Marking Period 3 has ended
|
| 48 |
04/07/06 |
|
Friday - Math, Network Demonstration |
|
- Classroom Discussion -
- Math, Ms. Verde & Hexadecimal numbers
- Networking discussion
- Lab Assignment -
- Networking demonstration
- 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 |