QT2

**QT2**
1. Calculate how many feet and inches there are in 3456 inches. 2. Calculate how hours, minutes and seconds there are in 33333 seconds. 3. You will need 1 variable for accepting input. How many additional variables will you need to calculate and output the answer for the program ConvertSeconds.cpp?

__C++ Program__: **ConvertSeconds.cpp** Create a program in C++ in which the user inputs a number of seconds and the program outputs the number of hours, minutes, and seconds that it is equivalent to. Use the modulus operator, %, to calculate the remaining minutes and seconds.
 * **Input Seconds** || **Output**
 * Hours** || **Output Minutes** || **Output**
 * Seconds** ||
 * -1234 ||  ||   ||   ||
 * -1 ||  ||   ||   ||
 * 16888 || 4 || 41 || 28 ||
 * 7000 || 1 || 56 || 40 ||

Upload to your gaggle digital locker.

//Objective: Use analytical thinking to create a working clock in Scratch.// //Objective: Use analytical thinking to create a program in C++ that converts seconds into hours, minutes, and seconds.// Put answer to MidTerm in this Quiz School box to see your grade. media type="custom" key="8145652"
 * Friday & Tuesday January 21 & 25, 2011**

__Scratch Filename__: **Clock.sb** Use your own ingenuity and the 1 page handout, titled Clock.sb Directions to create a program in Scratch that operates as a clock. __C++ Program__: **ConvertSeconds.cpp** Create a program in C++ in which the user inputs a number of seconds and the program outputs the number of hours, minutes, and seconds that it is equivalent to. Use the modulus operator, %, to calculate the remaining minutes and seconds. . Upload to your gaggle digital locker.
 * **Input Seconds** || **Output**
 * Hours** || **Output Minutes** || **Output**
 * Seconds** ||
 * -1234 ||  ||   ||   ||
 * -1 ||  ||   ||   ||
 * 16888 || 4 || 41 || 28 ||
 * 7000 || 1 || 56 || 40 ||

MidTerm Exam: Multiple Choice
 * Thursday 1/20/11 **
 * Assessment: **

//Objective: Use analytical thinking to create a working clock in Scratch.// //Objective: Use analytical thinking to create a program in C++ that converts seconds into hours, minutes, and seconds.//
 * Thursday & Friday January 13 & 14, 2011**

On Clock Do Now handout, answer these questions also: 1. How many seconds are in a minute? Write as a ratio. 2. How many minutes are in an hour? Write as a ratio. 3. How many seconds are in an hour? Write as a ratio. 4. How many degrees are in a circle? 5. How many numbers appear on the clock? 6. How many degrees must the second hand move in 1 second? Write as a ratio. 7. How many degrees does the minute hand move in 1 hour? Write as a ratio. Reduce the fraction to show how many degrees the minute hand moves in 1 second. 8. How many degrees are there from the number 12 to the number 1, from the number 1 to the number 2, etc? Write as a ratio. 9. How many degrees does the hour hand move in 1 hour? Write as a ratio. Reduce the fraction to determine how many degrees the hour hand moves in 1 second. __Scratch Filename__: **Clock.sb** Use your own ingenuity and the 1 page handout, titled Clock.sb Directions to create a program in Scratch that operates as a clock. __C++ Program__: **ConvertSeconds.cpp** Create a program in C++ in which the user inputs a number of seconds and the program outputs the number of hours, minutes, and seconds that it is equivalent to. Use the modulus operator, %, to calculate the remaining minutes and seconds. . Upload to your gaggle digital locker.
 * **Input Seconds** || **Output**
 * Hours** || **Output Minutes** || **Output**
 * Seconds** ||
 * -1234 ||  ||   ||   ||
 * -1 ||  ||   ||   ||
 * 16888 || 4 || 41 || 28 ||
 * 7000 || 1 || 56 || 40 ||

//Objective: Analyze a program that uses the modulus operator.// __Paper and Pencil__: **Questions on Section 5.1** (Green and Gold Textbook) __Scratch Filename__: **Clock.sb**
 * Tuesday January 11, 2011**

Turn in packet.

//Objective: Analyze a program that uses the modulus operator.//
 * Friday & Monday January 7 & 10, 2011**

__Go Over__: **Questions on Divis.cpp**

Turn in packet.

//Objective: Analyze a program that uses the modulus operator.// Finish Divis.cpp. __Paper and Pencil__: **Questions on Divis.cpp**
 * Wednesday & Thursday January 5 & 6, 2011**

Turn in packet.

//Objective: Write a program that demonstrates the modulus operator.// Finish Mod.cpp. __C++ Program:__**Divis.cpp** with bad data while loops and a continue while loop Directions in white binder. Print source code and output in the proper format.
 * Tuesday January 4, 2011**

//Objective: Write a program that demonstrates the modulus operator.// Discuss what you remember about the modulus operator from Visual Basic with another student. Share with the class. __C++ Program:__**Mod.cpp** with bad data while loops and a continue while loop Directions in white binder. Print source code and output in the proper format.
 * Monday January 3, 2011**

//Objective: Create a program to subtract that contains a continuation while loop.//
 * Tuesday December 21, 2010**

__Program__: **Subtract.cpp** Directions in your white binder.

//Objective: Debug an existing program.// __Paper and Pencil__: 1. Explain when and why you need to test more than one set of data when checking a program. __Program__: **SphError.cpp** This is a program to calculate the volume of a sphere.
 * Monday December 20, 2010**

I intentionally included quite a few errors in the program. Most of the errors are syntax errors that will result in error messages when you compile the program. There is at least one run-time error, which causes mistakes during the execution of the program. You must fix all of the errors. After you have fixed the errors and gotten the output results pictured on the direction paper in your notebook, save the final version of the program as **Sphere.cpp**. When you create the Word document with the source code and output, use ALL THE TEST DATA that I have provided. // Right click and save to the desktop. //

Read page 2 of the directions for **SphError.cpp** - Sphere.cpp in the notebook. Discuss the integer, float, and division situation presented and discuss with another student what you need to do in future program to insure correct results. __Paper and Pencil__: 2. Write your explanation on paper. Share your conclusions with the class.

Finish assignments.
 * Thursday & Friday December 16 & 17, 2010**

//Objective: Use while loops to repeat sections of code.// //Objective: Use while loops to allow repeated testing of a program without rerunning it.// __Paper and Pencil__: 1. Rewrite this code with corrections and improvements. 2. Explain why you made one of the corrections that was not a syntax error. __Program__: **Continue.cpp** Directions in white binder You must type all the comments.
 * Wednesday December 15, 2010**
 * cout << Enter the number for the month.; **
 * cin>> "Month"; **
 * while Month <= 0; **
 * { **
 * cout << "The number is correct because "; **
 * cout << "Enter the number for the month"; **
 * } **
 * cin >> Month; **

__Read__: **Explanations on New Topics Presented in TrapArea.cpp** at this link. @http://www.scribd.com/full/45221279?access_key=key-1oca8mlimz2midyfy304 Finish the **Questions on TrapArea.cpp** pages 1 to 4.

Print source code and output in the proper format for **Continue.cpp**.

//Objective: Explain stated main ideas and relevant supporting details from text. (R11A2.4.1)// //Objective: Use while loops to repeat sections of code.// //Objective: Use while loops to allow repeated testing of a program without rerunning it.// __Paper and Pencil__: 1. In general, when would you use a while loop? 2. What is a continue while loop? 3. Write the bad data while loop that might follow these statements: cout << "What grade are you in? "; cin >> Grade;
 * Tuesday December 14, 2010**

__Program__: **While1.cpp** Directions in white binder You must type all the comments.

Finish the **Questions on TrapArea.cpp** pages 1 to 4.

__Paper and Pencil__: 4. Explain what is occurring in the While1.cpp program. Print source code and output in the proper format for **While1.cpp**.


 * Monday December 13, 2010**

//Objective: Write programs that catch bad data.// //Objective: Use while loops to repeat sections of code.// //Objective: Use while loops to allow repeated testing of a program without rerunning it.// Open your white binder to the directions for **TrapArea.cpp**

__Read__: **Explanations on New Topics Presented in TrapArea.cpp** at this link. @http://www.scribd.com/full/45221279?access_key=key-1oca8mlimz2midyfy304

__Paper and Pencil__: **Questions on TrapArea.cpp** pages 1 to 4.

Finish the **Questions on TrapArea.cpp** pages 1 to 4.

Print source code and output in the proper format for any programs that you haven't done so yet.

//Objective: Read about news in computing.// //Objective: Do a random act of kindness.// __Paper and Pencil__: 1. On the lined paper write the 2 computer definitions given for hacker at http://dictionary.com.
 * Friday December 10, 2010**

Random //Hacks// of Kindness is a play on words taken from the concept of //Random Acts of Kindness// which may have come about to bring happy moments to those in a world where there are often //random acts of violence//.

__Read__: Read the packet titled, **Random Hacks of Kindness** __Paper and Pencil__: 2. On the lined paper, write a summary of what you read in sentences. 3. Also write what you might put in a blog entry sharing your thoughts about the event. @http://www.randomactsofkindness.org/

__Program__: **TrapArea.cpp** Directions in your notebook __Program__: Add a continue while loop to **RectangleArea.cpp**

__Paper and Pencil__: 4. On the line paper, write about the mental process you used to determine how to incorporate a continue while into RectangleArea.cpp. 5. What will you do as a random act of kindess (or a random hack of kindness) over the next few days?

Turn in your lined paper with your name on it. Turn in the stapled packet titled. **Random Hacks of Kindness** so it can be used for other classes.

//Objective: Write programs that catch bad data.// //Objective: Use while loops to repeat sections of code.// //Objective: Use while loops to allow repeated testing of a program without rerunning it.// Open your **Blank.cpp** program from Gaggle and save it to your desktop with the name **TrapArea.cpp**. Discuss bad data while loops and continue while loops. Compare to loops in Scratch __C++ Program:__**TrapArea.cpp** with bad data while loops and a continue while loop Directions in white binder Print source code and output in the proper format.
 * Thursday December 9, 2010**

//Objective: Write programs that catch bad data.// //Objective: Use while loops to repeat sections of code.// Open your **Blank.cpp** program from Gaggle and save it to your desktop with the name **RectangleArea.cpp**.
 * Wednesday December 8, 2010**

__C++ Program as Quiz:__**RectangleArea.cpp** with bad data while loops You must do this silently and individually. You may use your binder. You may NOT use any other program besides Blank.cpp Make sure your output demonstrates that your program catches bad data repeatedly and produces correct results for good data. Print source code and output in the proper format.
 * The program must calculate the area of a rectangle when the user provides the length and width.**