home

=Computer Programming II (C++) CS702 Period 8=

//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.**

//Objective: Write programs that catch bad data.// //Objective: Use while loops to repeat sections of code.// Open your **Circle1.cpp** program from Gaggle and save it to your desktop with the name **Circle2.cpp**.
 * Monday & Tuesday December 6 & 7, 2010**

__C++ Program:__ **Circle2.cpp** with bad data while loops

Start with Blank.cpp __C++ Program:__ **TriangleArea.cpp** with bad data while loops Start with Blank.cpp __C++ Program:__ **RectangleArea.cpp** with bad data while loops

Print source code and output in the proper format, after you get permission. Upload to your Gaggle digital locker.

//Objective: Write programs that catch bad data.// //Objective: Use while loops to repeat sections of code.// Take the stapled packet to Miss Gallagher-Edlund's room, D100 for class. Work quietly. Save your **Travel.cpp** program from Gaggle to your desktop. If you do not have it, type it in **Turbo C++** 4.5 because that is the compile available in D100.
 * Thursday & Friday December 2 & 3, 2010**

__C++ Program:__ **Travel.cpp** with bad data while loops Read and follow all directions on the 4 page stapled packet: **Travel.cpp Inserting a Bad Data While Loop**. Print source code and output in the proper format, after you get permission from Mrs. Gallagher-Edlund. Bring your print to class tomorrow, or wait until tomorrow to print. Upload to your Gaggle digital locker.

Discuss Divide.cpp Discuss bad data while loops. Finish back assignments.
 * Wednesday December 1, 2010**

//Objective: Use if else statements to select between 2 sections of code to execute.//  What is acceptable input for the numerator of a fraction? What is unacceptable input for the dividend in a division problem? What is acceptable input for the denominator of a fraction? What is unacceptable input for the divisor in a division problem? Even when using integers for the numerator and denominator, the more accurate quotient may be what type of number? The flowchart below can be written in C++ code as what type of structure?
 * Tuesday November 30, 2010**



 Read pages 40 to 43 in the Dawson paper back book. Start with Blank.cpp Program: **Divide**.cpp Use an if else structure. The beginning of the output might look like this.

 Save and upload to your Gaggle digital locker.

//Objective: Use if switch statements to select a section of code to execute.// //Objective: Us while and do loops to repeat sections of code.// Read in black paper back textbook: Chapter 2 Truth, Branching, and the Game Loop: Guess My Number P. 43 - 46
 * Monday November 29, 2010**

__C++ Program:__ **MenuChooser.cpp** Read: P. 46 - 48 __C++ Program:__ **PlayAgain.cpp** Read: P. 48 - 50 __C++ Program:__ **PlayAgain2.cpp** Print source code and output in the proper format. Put your white binder and textbook away.

//Objective: Use x-y coordinate system and random numbers.// //Objective: Use a counter.// //Objective: Use a compound condition.// Discuss things you do over Thanksgiving weekend. __Scratch Program:__ **Thanksgiving.sb** 2 pages of directions You are required to make the program better by:
 * Tuesday November 23, 2010**
 * changing the condition (control expression for the forever if to a compound expression that will only be true when both the mouse is clicked and the mouse pointer is touching the button sprite.
 * making a variable to count the number of times your favorite thing in the list is displayed.
 * setting the counter to zero when the green flag is clicked
 * making one other improvement of your choice.

Save to the desktop, upload to Gaggle, delete off the desktop, empty recycle bin.

//Objective: Use if statements to branch to sections of code.// Read in black paper back textbook: Chapter 2 Truth, Branching, and the Game Loop: Guess My Number P. 35 - 41
 * Monday November 22, 2010**

__C++ Program:__ **ScoreRater.cpp** Read: P. 41 - 43 __C++ Program:__ **ScoreRater2.cpp** Print source code and output in the proper format. Put your white binder and textbook away.

Finish all back work. __Scratch Program:__ **Divide.sb** Do **NOT** print. Just save the program.
 * Friday November 19, 2010**

__Type in Word:__ **ScratchDivision.docx** Write in sentences and paragraphs.

Explain the nuances of the 3 scripts. Explain the different ways each of them responds to a denominator of 0 and what in the script makes it work that way. Give additional information on the **if** structure and the **if else** structure. Explain when an **if - else** structure is preferred over an **if** and vice versa.


 * Print** your **ScratchDivision.docx** document that includes your standard header and footer.

//Objective: Increment and decrement variables.// //Objective: Write and debug a simple program.// Pick a partner to work with for today only. Save your Word document template to the desktop with the filename: **Ch1.docx** Only 1 file per pair needed, so make sure both of your names are on the document and both of you contribute. Change the Title to **Chapter 1 Discussion Questions and Exercises**.
 * Tuesday & Thursday, November 16-18 2010**

In the Word document type the answers to the Discussion Questions on page 32, by starting with a restatement of each question as part of your answers. Include pictures of your source code and your output for # 3, and explain how you know your output is correct. Print **Ch1.docx**. Upload Ch1.docx and your program to your Gaggle digital locker. Put your white binder and textbook away.
 * P. 32 Discussion Questions 1-5**
 * P. 33 Exercises 2 - 3**

//Objective: Declare variables and define constants with appropriate data types and correct syntax.// //Objective: Increment and decrement variables.// //Objective: Declare enumerated types.// Read Chapter 1 of black book, **pages 25 - 26**. Program: **GameStats3.cpp** P. 26 Read pages 27 - 30 Program: **LostFortune.cpp** P. 28-30 Print source code and output in the proper format. Put your white binder and textbook away.
 * Monday November 15, 2010**

Turn in back work for the first marking period.
 * Friday November 12, 2010**

//Objective: Declare variables and define constants with appropriate data types and correct syntax.// Read Chapter 1 of black book, **pages 25 - 26**. Program: **GameStats3.cpp** P. 26 Read pages 27 - 30 Program: **LostFortune.cpp** P. 28-30
 * Thursday November 11, 2010**

Print source code and output in the proper format. Put your white binder and textbook away.

//Objective: Declare variables and define constants with appropriate data types and correct syntax.// Read Chapter 1 of black book, **pages 1-12**. Program: **ExpensiveCalculator.cpp** P. 12 Read pages 12 - 14 Program: **GameStats.cpp** P. 14-15 Read pages 15 - 21 Program: **GamesStats2.cpp** P. 21-22 Read pages 22 - 24 Print source code and output in the proper format. Put your white binder and textbook away.
 * Tuesday & Wednesday November 9,10, 2010**