QT3QT4

C++ 3rd and 4th Marking Periods 2009-2010

=Period 8 Computer Programming II in C++=

**Thursday - Wednesday 6/3-9/10**
 * Objective: Final Exam Program.**

** Final Exam Program: ** __Program:__ **Shop.cpp**

**Tuesday 6/1/10**
 * Objective: Explore the standard template library and vectors.**

**Do Now:** __Read:__ Read pages 112- 116 in the paper back Dawson textbook.

__Program:__ **HighScores.cpp**
 * Assignment: **

Friday 5/28/10 Objective: Explore the standard template library and vectors.

**Do Now:** __Read:__ Read pages 105 - 112 in the paper back Dawson textbook.

__Program:__ **HerosInventory3.cpp**
 * Assignment: **

Thursday 5/27/10 media type="custom" key="6249845"

Tuesday & Wednesday 5/25,26/10 Objective: Explore the standard template library and vectors.

**Do Now:** __Read:__ Read pages 99 - 105 in the paper back Dawson textbook.

__Program:__ **HerosInventory2.cpp**
 * Assignment: **

**Thursday - Monday 5/20-24/10**
 * Objective: Explore the concept of structures.**

**Do Now:** __Read:__ Read pages 195 - 200 in the green and gold textbook.

__Program:__ **Struct.cpp** Do Exercise 10-7 which starts on page 197. For number 1, type in the code from the blue sections in the textbook on page 196 to 197.
 * Assignment: **

__Program:__ **Donors.cpp** Do Exercise 10-8 which starts on page 199.


 * Wednesday 5/19/10**
 * Objective: Use math library functions.**

** Assignment: ** __Program in Notebook:__ **PowerCircTrigLog.cpp**


 * Monday 5/17/10**
 * Objective: Write code for function definitions.**

**Do Now:** __Read:__ Read the function prototypes and main function for the program ReduceFractions.cpp in your white notebook. Read the test data and output pages 4 to 10 of the document. Determine what must be included in the function definitions. Discuss you thoughts with another student. Share your thoughts with the class.

__Program:__ **ReduceFractions.cpp** Enter the code from the direction sheets in your notebook. Add the missing code for the function definitions from page 3, based on the output provided. Test the program thoroughly. Have another student test your program and you test another student's program.
 * Assignment: **

__Paper and Pencil:__ Are the comments helpful in explaining main function code? Why or why not? What could be done to make this program better?
 * Ticket out Door: **


 * Friday-Friday 5/7-14/10**
 * Objective: Use library functions.**

**Do Now: ** __Read:__ P. 170 - 174 Chapter 9 Section 3 and Summary of the green and gold textbook
 * Using Library Functions**
 * Popular Math Functions**
 * Trigonometric and Logarithmic Functions**
 * Functions for Working with Characters**
 * Key Terms**
 * Summary**

__Programs:__
 * Assignment: **
 * P. 171 Power.cpp** (Just use the function call. Do not type the prototype or function code because it is built in.)
 * P. 171 Circ.cpp** (Just use the function call. Do not type the prototype or function code because it is built in.)
 * P. 172 TrigLog.cpp** (Just use the function call. Do not type the prototype or function code because it is built in.)
 * P. 173 CharFun.cpp** (Just use the function call. Do not type the prototype or function code because it is built in.)

__Paper and Pencil:__ P. 173 Section 9.3 Questions 1-6
 * Ticket out Door: **


 * Tuesday - Thursday 5/4-6/10**
 * Objective: Use functions to break programs into parts.**

**Do Now: ** __Read:__ P. 167 - 169 Chapter 9 Section 2 of the green and gold textbook
 * Getting Data to and from Functions**
 * Dividing the Series Program into Functions**

__Programs:__
 * Assignment: **
 * PassRef.cpp**
 * CtoF.cpp** (In your notebook)

__Paper and Pencil:__ P. 170 Section 9.2 Questions 1-7
 * Ticket out Door: **


 * Thursday 4/29/10 & Monday 5/3/10**
 * Objective: Use functions to break programs into parts.**

**Do Now: ** __Read:__ P. 163 - 167 Chapter 9 Section 2 of the green and gold textbook
 * Data and Functions**
 * Scope of Variables**
 * Getting Data to and from Functions**

__Programs:__
 * Assignment: **
 * Scope.cpp**
 * PassVal.cpp**

__Paper and Pencil:__ 1. Explain the difference between **passing by value** and **passing by reference (address)**. 2. What is the difference between **arguments** and **parameters**?
 * Ticket out Door: **


 * Monday - Wednesday 4/26-28/10**
 * Objective: Use functions to break programs into parts.**

** Assignment: ** __Paper and Pencil:__ Green and gold textbook P. 162 Section 9.1 Questions 1 - 3, 5, 6. __Programs:__ Problem 9.1.1 P. 162 GasCheck.cpp Problem 9.1.2 P. 162 ValTest.cpp


 * Friday 4/23/10**
 * Objective: Use functions to break programs into parts.**

**Do Now: ** __Read:__ P. 156 - 158 Chapter 9 Section 1 of the green and gold textbook
 * How to Build Programs with Functions**

__Program:__ **Proto1.cpp** Code and output in your notebook.
 * Assignment: **

**Ticket out Door: ** __Paper and Pencil:__ 1. Explain the difference between **top-down design** and **bottom-up design**. 2. Which of these concepts is **easiest** for you to understand and **why**. 3. Which of those 4 concepts is the **hardest** for you to understand and **why**.
 * Organization, Autonomy, Encapsulation, Reusability** (see page 158)

**Friday - Thursday 4/16-22/10** Use for loops to iterate over sequences. Use objects, which combine data and functions. Use string objects and their member functions to work with sequences of characters. Use arrays to store, access, and manipulate sequences of any type. Use multidimensional arrays to better represent certain groups of information.
 * Objectives: Produce a portfolio of your Chapter 3 (and Chapter 8 of green gold book) assignments.**

**Do Now: ** Read P. 94 -95 Chapter 3 Summary Read P. 95-96 Chapter 3 Questions and Answers

Create a Chapter 3 portfolio with the filename, **Ch3PortfolioCPP.doc** for P. 71-97 **Ch 3** **For Loops, Strings, and Arrays: Word Jumble**
 * Assignment: **

Programs: (You have already done these.) P. 72 Counter.cpp P. 78 StringTester.cpp P. 83 HerosInventory.cpp P. 89 TicTacToeBoard.cpp P. 91 WordJumble.cpp ForLoop.cpp Backward.cpp OddLoop.cpp SumItUp.cpp AB123.cpp OuterInnerLoop.cpp Possible.cpp FiveFour.cpp Vowels.cpp AlphabetPositions.cpp StringInput.cpp CharacterCountB.cpp InLine.cpp WasteChalk.cpp StringToNumber.cpp EnumTest.cpp

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Word Document: Create a document in Microsoft Word with the filename, **Ch3PortfolioCPP.doc**, by starting with the template below. Save to the desktop and upload to your Gaggle digital locker. When it is complete, get permission from Miss Hangen to print it. In it include the follow sections:
 * **P. 97 Discussion Questions 1-5: Answer the questions in sentence form.**
 * **P. 97 1-3 Exercises**
 * **Paste screen shots of these programs into your Word document.**
 * InLine.cpp
 * WasteChalk.cpp
 * StringToNumber.cpp
 * EnumTest.cpp
 * SumItUp.cpp
 * **Paste screen shots of your output for these programs into your Word document.**
 * **Get permission from Miss Hangen to print it.**


 * Wednesday & Thursday 4/14,15/10**
 * Objective: Practice with enum.**

<span style="font-family: 'Comic Sans MS',cursive;">**Do Now:** Read in the green and gold textbook, pages 193-195 Ch 10 Section 3 Using Enum.

EnumTest.cpp P. 193 in green and gold textbook
 * Program: **

Paper and Pencil: P. 195 Section 10.3 Questions 1-6 Problem 10.3.1


 * Monday 4/12/10**
 * Objective: Experiment with bad data checking for characters provided when numbers are asked for.**

**<span style="font-family: 'Comic Sans MS',cursive;">Do Now: ** Study the print out of the source code of **WasteChalk.cpp** in your notebook.


 * Program: **
 * StringToNumber.cpp**

__Objective:__ Decide on the best structure to do a specific task in a program.
 * Thursday & Friday 4/8,8/10**

<span style="display: block; font-family: 'Comic Sans MS',cursive;">Do Now: Study the print out of the source code of **WasteChalk.cpp** in your notebook.

** Program: ** Finish **WasteChalk.cpp**

Catching bad data and default with the switch case structure Catching when a letter was entered into a numeric variable @http://www.codeguru.com/forum/showthread.php?t=231054
 * <span style="font-family: 'Comic Sans MS',cursive;">Discussion :**

**Tuesday & Wednesday 4/6,7/10** __Objective:__ Decide on the best structure to do a specific task in a program.

<span style="display: block; font-family: 'Comic Sans MS',cursive;">Do Now: Study the print out of the execution of WasteChalk.cpp in your notebook.

** Program: ** WasteChalk.cpp

**Thursday 4/1/10**
 * Objective:** Lorem ipsum dolor sit amet, consectetur adipiscing elit.

<span style="font-family: Arial,Helvetica,sans-serif;">**Paper and Pencil:** Fusce pellentesque semper purus vehicula dapibus.

Quisque.cpp Example here.
 * Program:**

**__Objective:__**
 * Thursday 4/1/10**
 * Decide on the best structure to do a specific task in a program.**

**Do Now:** Look at the picture and decide what structures would work well to produce a program that would provide a menu with choices of what to write on the board a specified number of times, using C++ instead of VB.

Program: **WasteChalk.cpp** Write the program. []
 * __Assignment:__**

<span style="background-color: #800000; color: #ffff00; display: block; font-family: Arial,Helvetica,sans-serif;">__Ticket out the Door:__
 * Have a nice vacation and a Happy Easter.**

**Wednesday 3/31/10**
 * Objective:** Write programs that demonstrate the use of character arrays.

<span style="font-family: Arial,Helvetica,sans-serif;">**Paper and Pencil:** cin.get & cin.ignore

InLine.cpp
 * Program:**


 * Tuesday 3/30/10**
 * Objective:** Write programs that demonstrate the use of getline, for loop, cin.ignore, size, counting, and a string as a character array.

** Program: ** CharacterCountB.cpp


 * Monday 3/29/10**
 * Objective:** Write programs that demonstrate the use of getline for string object input.

**Programs:** StringInputBlank.cpp Continue your work with this program. AlphabetPositions.cpp Refer to the directions and output provided in your notebook.


 * Wednesday - Friday 3/24 - 26/10**
 * Objective:** Write programs that demonstrate use of string objects and the functions find, erase, and size, in addition to using the fact that strings are character arrays.

<span style="font-family: Arial,Helvetica,sans-serif;">** Do Now: ** What are the data types of these variables in the code below? 1. **Location** 2. **C** 3. **Alphabet** 4. **Letter**
 * Paper and Pencil:**

Location = Alphabet.find("u"); Alphabet.erase(Location, 1); C = Alphabet.size; Letter = Alphabet[Position];

**Discussion:** <span style="font-family: Arial,Helvetica,sans-serif;">Look at the Vowel.cpp programs each other did.

**Programs:** Continue your work with these programs. Vowels.cpp AlphabetPositions.cpp Refer to the directions and output provided in your notebook.

What will help you with the program you are working on?
 * Ticket out Door: **


 * Tuesday 3/23/10**
 * Objective:** Write programs that demonstrate use of string objects and the functions find, erase, and size, in addition to using the fact that strings are character arrays.

<span style="font-family: Arial,Helvetica,sans-serif;">** Do Now: ** Re-read pages 77-82.

**Programs:** Vowels.cpp AlphabetPositions.cpp Refer to the directions and output provided in your notebook.

What is an idea you have for a program that demonstrates that you understand strings?
 * Ticket out Door: **


 * Monday 3/22/10**
 * Objective:** Write programs that demonstrate use of string objects and the functions find, erase, and size, in addition to using the fact that strings are character arrays.

<span style="font-family: Arial,Helvetica,sans-serif;">** Do Now: ** Re-read pages 77-82.

Miss Hangen will give an explanation and examples of working with string objects.
 * <span style="font-family: 'Comic Sans MS',cursive;">Explanation: **

**Programs:** Vowels.cpp AlphabetPositions.cpp Refer to the directions and output provided in your notebook.

What is an idea you have for a program that demonstrates that you understand strings?
 * Ticket out Door: **

media type="custom" key="5670639"
 * Friday 3/19/10**
 * Objective**: To review for loops and strings. <span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">
 * Do Now:**

Program: Write source code for this output.
 * Vowels.cpp**


 * <span style="font-family: 'Courier New',Courier,monospace;">Vowels.cpp by Your Name **
 * <span style="font-family: 'Courier New',Courier,monospace;">This program will display the lowercase letters of the alphabet without the vowels. **
 * <span style="font-family: 'Courier New',Courier,monospace;">It will also count how many letters are not vowels. **
 * <span style="font-family: 'Courier New',Courier,monospace;">There is no input required by the user. **


 * <span style="font-family: 'Courier New',Courier,monospace;">Here are the letters of the alphabet that are not vowels. **
 * <span style="font-family: 'Courier New',Courier,monospace;">bcdfghjklmnpqrstvwxyz **


 * <span style="font-family: 'Courier New',Courier,monospace;">There are 21 letters that are not vowels. **


 * <span style="font-family: 'Courier New',Courier,monospace;">The Vowel.cpp program has ended. **

What is an idea you have for a program that demonstrates that you understand strings?
 * Ticket out Door: **

**Tuesday & Wednesday 3/16,17/10** <span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;"> FiveFour.cpp Write a program that will display a numbered list of all the possible ways to answer a 4-question multiple choice test with 5 choices for each answer.
 * Objective**: To use the fundamental counting principal of probability, nested for loops, and ASCII codes to create a program using letters of the alphabet.
 * Program:**
 * Directions for FiveFour.cpp:**

**Monday 3/15/10** <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">**Do Now:** <span style="color: #000000; font-family: Arial,Helvetica,sans-serif;">**Think - Pair - Share** Can you use numbers to refer to letters of the alphabet? What are ASCII Codes? Where can you find them? How do you use them in C++?
 * Objective**: To use the fundamental counting principal of probability, nested for loops, and ASCII codes to create a program using letters of the alphabet.

<span style="color: #000000; font-family: 'Comic Sans MS',cursive;">**Program:** Possible.cpp Write a program that uses nested loops to display a numbered list of all the possible ways to answer a 3-question multiple choice test with 4 choices for each answer You will need a cout.setf function and setw to make the output appear in columns. The beginning of the code is provided in your notebook.
 * Directions for Possible.cpp:**



OutterInnerLoop.cpp (Directions in notebook)
 * Friday 3/12/10**
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Program: **

**Thursday 3/11/10** OddLoop.cpp SumItUp.cpp
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Programs to Look at Together: **

**Wednesday 3/10/10** NameLoop.cpp
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Programs to Look at Together: **

**Tuesday 3/9/10** AB123.cpp NameLoop.cpp
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Programs to Look at Together: **

**Monday-Wednesday 3/8-10/10** <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">**Reading:** **Ch 8 Loops: Summary and Questions** (This is chapter 8 in the green and gold textbook.) **Ch 8 Loops: Summary and Questions** (This is chapter 8 in the green and gold textbook.) NameLoop.cpp OddLoop.cpp SumItUp.cpp AB123.cpp
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Paper and Pencil: **
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Programs: **

** Friday 3/5/10 ** <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">**Program:** Backward.cpp **Check your 3rd marking period assignments!!!**

<span style="color: #000000; font-family: 'Comic Sans MS',cursive;">**<span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Reading: ** <span style="color: #000000; font-family: Arial,Helvetica,sans-serif;">**Ch 8 Loops: Summary and Questions** (This is chapter 8 in the green and gold textbook.) <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">**Paper and Pencil:** <span style="color: #000000; font-family: Arial,Helvetica,sans-serif;">Continue working on **Ch 8 Loops: Summary and Questions** (This is chapter 8 in the green and gold textbook.) ForLoop.cpp
 * Thursday 3/4/10 **
 * Program:**

** Wednesday 3/3/10 ** **Ch 8 Loops: Summary and Questions** (This is chapter 8 in the green and gold textbook.) Start working on **Ch 8 Loops: Summary and Questions** (This is chapter 8 in the green and gold textbook.)
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Reading: **
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Paper and Pencil: **

**Introducing Word Jumble** on pages 90 - 94 in Dawson paper textbook. WordJumble.cpp
 * Monday, Tuesday 3/1,2/10**
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Reading: **
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Program: **


 * Friday 2/26/10**

Snow and Wind Day -- No School

Thursday 2/25/10 <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Reading: Understanding C-Style Strings on pages 87 - 88 in Dawson paper textbook.
 * Using Multidimensional Arrays** on pages 88 - 90.

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Program: P. 89 TicTacToeBoard.cpp

Wednesday 2/24/10

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Reading:
 * Using Arrays** on pages 83 - 87 in Dawson paper textbook.

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Program: P. 83-84 HerosInventory.cpp


 * Tuesday 2/23/10**

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Reading:
 * Understanding Objects** on pages 75 - 82 in Dawson paper textbook.

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Program: P. 78 StringTester.cpp


 * Monday 2/22/10**

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Reading: Read pages 71 - 75 in Dawson paper textbook.

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Program: P. 72- 73 Counter.cpp


 * Wednesday - Friday 2/17-19/10**

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Program: GuessMyNumber2.cpp P. 69 Exercise 3
 * Work on this together.**


 * Tuesday 2/16/10**

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Do Now: Finish Discussion Questions and Wiki.

<span style="color: #000000; display: block; font-family: 'Comic Sans MS',cursive;">Assignment: P. 69 Do Exercises 1-3

Random Read of Questions and Answers on page 67 and 68. Look at RandomStudent.cpp Discussion Questions and Wiki.
 * Tuesday 2/9/10**

Go over Summary.
 * Monday 2/8/10**

**2/5/10** Read the Summary and Questions and Answers on pages 66 to 68 in the Dawson paper back textbook. Think - Pair - Share: Think about the discussion questions on page 68 and jot some answers on paper. Talk it over with a couple of students in the class to expand your thinking and answers. Edit http://hangencpp.wikispaces.com/ with your groups answers. P. 69 Do the exercises. <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">**Ticket out Door:** Read the answer provided by other groups.
 * Friday**
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Do Now: **
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Assignment: **


 * Thursday 2/4/10**

Do Now:
 * Read:** Read the front and back of the handout titled, **Fewer High School Students Taking Computer Science Classes**.

__Assignment:__ 1. Summary of article 2. How this relates to you 3. What you would say in a blog post.
 * Write on paper or type in Microsoft Word:**

<span style="background-color: #800000; color: #ffff00; display: block; font-family: Arial,Helvetica,sans-serif;">__Ticket out the Door:__ Turn in your hand-written paper or save your Word document as CSclassesArticle.doc and upload it to your Gaggle digital locker. Read the Summary and Questions and Answers on pages 66 to 68 in the Dawson paper back textbook. Think - Pair - Share: Think about the discussion questions on page 68 and jot some answers on paper. Talk it over with a couple of students in the class to expand your thinking and answers. Edit http://hangencpp.wikispaces.com/ with your groups answers. <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">**Ticket out Door:** Read the answer provided by other groups.
 * Wednesday 2/3/10**
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Do Now: **
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Assignment: **

In general what is a common use of a switch case structure? <span style="color: #000000; font-family: Arial,Helvetica,sans-serif;">Program: **ShipPigeon.cpp** Directions in your white notebook. Program: **PlanetWeight.cpp** Directions are in the green and gold textbook pages 134 and 135 Project 7-4.
 * Thursday 1/28/10 and Monday, Tuesday 2/1,2/10**
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Do Now: **
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Assignment: **

Finish paper and pencil assignment <span style="color: #000000; font-family: Arial,Helvetica,sans-serif;">Program: **Shipping.cpp** Directions in your white notebook.
 * Wednesday 1/27/10**
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Do Now: **
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Assignment: **

Read: Switch Structure Notes & Chapter 7 Summary (in white notebook) Paper and Pencil: Questions on Switch Structure Notes Ch. 7 Summary (in white notebook) Refer to Chapter 7 in the Green and Gold textbook.
 * Monday & Tuesday 1/25, 26/10**
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Do Now: **
 * <span style="color: #000000; font-family: 'Comic Sans MS',cursive;">Assignment: **

First marking period assignment at QT1 page. Second marking period assignment at QT2.